summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CodeGenOptions.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2015-03-12 15:16:58 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2015-03-12 15:16:58 +0000
commitde2fb00a1623905d3a315af2cd938048c5864591 (patch)
tree46dfc575ee51bfa063edef0a18f1cd74824a1571 /clang/lib/Frontend/CodeGenOptions.cpp
parentaf1846c09755afa88b20b949722b554a7c95a4b0 (diff)
downloadbcm5719-llvm-de2fb00a1623905d3a315af2cd938048c5864591.tar.gz
bcm5719-llvm-de2fb00a1623905d3a315af2cd938048c5864591.zip
[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. llvm-svn: 232046
Diffstat (limited to 'clang/lib/Frontend/CodeGenOptions.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud