llvm-6502/lib
Chris Lattner e56d946a38 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-31 09:23:55 +00:00
..
Analysis Fix a typo in a comment. 2008-05-30 00:08:18 +00:00
Archive Create archives with the same permissions are ar. 2008-05-24 05:42:29 +00:00
AsmParser IR, bitcode reader, bitcode writer, and asmparser changes to 2008-05-31 00:58:22 +00:00
Bitcode IR, bitcode reader, bitcode writer, and asmparser changes to 2008-05-31 00:58:22 +00:00
CodeGen Remove an unused variable. 2008-05-31 01:44:25 +00:00
Debugger Make these variables static. 2008-04-23 23:15:23 +00:00
ExecutionEngine Add #includes to make some dependencies explicit. 2008-05-23 20:40:06 +00:00
Linker Factor code to copy global value attributes like 2008-05-26 19:58:59 +00:00
Support Give a proper error message when a command line option is defined more than 2008-05-30 13:26:11 +00:00
System Unbreak build. 2008-05-29 22:02:08 +00:00
Target Fix the CBE's handling of instructions whose result is an i1. Previously, 2008-05-31 09:23:55 +00:00
Transforms rewrite operand loops to use iterators 2008-05-30 21:24:22 +00:00
VMCore Factor several methods, including getInversePredicate and 2008-05-31 02:47:54 +00:00
Makefile