summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-03-19 14:08:23 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-03-19 14:08:23 +0000
commit8ee477a2ab6a9dc184359e634c91925ea347888f (patch)
tree636cb2656653a1e5fa3aea4392b3441076d64304 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentdd59d27a1f8aa993187f8476cccf98bcc9f24ec2 (diff)
downloadbcm5719-llvm-8ee477a2ab6a9dc184359e634c91925ea347888f.tar.gz
bcm5719-llvm-8ee477a2ab6a9dc184359e634c91925ea347888f.zip
[InstSimplify] SimplifyICmpInst - icmp eq/ne %X, undef -> undef
As discussed on PR41125 and D59363, we have a mismatch between icmp eq/ne cases with an undef operand: When the other operand is constant we fold to undef (handled in ConstantFoldCompareInstruction) When the other operand is non-constant we fold to a bool constant based on isTrueWhenEqual (handled in SimplifyICmpInst). Neither is really wrong, but this patch changes the logic in SimplifyICmpInst to consistently fold to undef. The NewGVN test change is annoying (as with most heavily reduced tests) but AFAICT I have kept the purpose of the test based on rL291968. Differential Revision: https://reviews.llvm.org/D59541 llvm-svn: 356456
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud