aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-31 09:23:55 +0000
committerChris Lattner <sabre@nondot.org>2008-05-31 09:23:55 +0000
commit666d664595219ef12601e98db4c98763a0c977ee (patch)
tree4008c054a6966c92b09b9240ac570a2385df0ed4 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent930e099b9011240122a3e9b79e35cdc9efab859c (diff)
downloadllvm-666d664595219ef12601e98db4c98763a0c977ee.zip
llvm-666d664595219ef12601e98db4c98763a0c977ee.tar.gz
llvm-666d664595219ef12601e98db4c98763a0c977ee.tar.bz2
Fix the CBE's handling of instructions whose result is an i1. Previously,
we did not truncate the value down to i1 with (x&1). This caused a problem when the computation of x was nontrivial, for example, "add i1 1, 1" would return 2 instead of 0. This makes the testcase compile into: ... llvm_cbe_t = (((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u))&1); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... instead of: ... llvm_cbe_t = ((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u)); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... This fixes a miscompilation of mediabench/adpcm/rawdaudio/rawdaudio and 403.gcc with the CBE, regressions from LLVM 2.2. Tanya, please pull this into the release branch. llvm-svn: 51813
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions