llvm-6502/lib
Andrea Di Biagio be9322ae7c [X86] Fix wrong target specific combine on SETCC nodes.
Part of the folding logic implemented by function 'PerformISDSETCCCombine'
only worked under the assumption that the condition code in input could have
been either SETNE or SETEQ.
Unfortunately that assumption was incorrect, and in some cases the algorithm
ended up incorrectly folding SETCC nodes.

The incorrect folding only affected SETCC dag nodes where:
 - one of the operands was a build_vector of all zeroes;
 - the other operand was a SIGN_EXTEND from a vector of MVT:i1 elements;
 - the condition code was neither SETNE nor SETEQ.

Example:
  (setcc (v4i32 (sign_extend v4i1:%A)), (v4i32 VectorOfAllZeroes), setge)

Before this patch, the entire dag node sequence from the example was
incorrectly folded to node %A.

With this patch, the dag node sequence is folded to a
  (xor %A, (v4i1 VectorOfAllOnes)).

Added test setcc-combine.ll.

Thanks to Greg Bedwell for spotting this issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232046 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12 15:16:58 +00:00
..
Analysis Stop calling DwarfEHPrepare from WinEHPrepare 2015-03-12 00:36:20 +00:00
AsmParser
Bitcode
CodeGen [X86, AVX] replace vextractf128 intrinsics with generic shuffles 2015-03-12 15:15:19 +00:00
DebugInfo
ExecutionEngine
Fuzzer
IR [X86, AVX] replace vextractf128 intrinsics with generic shuffles 2015-03-12 15:15:19 +00:00
IRReader
LineEditor
Linker
LTO
MC [NVPTXAsmPrinter] do not print .align on function headers 2015-03-12 01:50:30 +00:00
Object
Option
Passes
ProfileData
Support
TableGen
Target [X86] Fix wrong target specific combine on SETCC nodes. 2015-03-12 15:16:58 +00:00
Transforms Reapply 'Run LICM pass after loop unrolling pass.' 2015-03-12 05:36:01 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile