DAGCombiner: Don't fold xor into not if getNOT would introduce an illegal constant.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 Oct 2013 14:16:19 +0000 (14:16 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 Oct 2013 14:16:19 +0000 (14:16 +0000)
commit72a3ee742296aa68fda0118d0e1fa649be756938
treefc567bd5984b78fd0a03772ea7af2c051e6c52f9
parent3386d252579ea00d0fc26a3ba7874bec25ce4516
DAGCombiner: Don't fold xor into not if getNOT would introduce an illegal constant.

This happens e.g. with <2 x i64> -1 on x86_32. It cannot be generated directly
because i64 is illegal. It would be nice if getNOT would handle this
transparently, but I don't see a way to generate a legal constant there right
now. Fixes PR17487.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192795 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/xor.ll