Canonicalize boolean +/- a constant to a select.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 13 Jul 2009 22:27:52 +0000 (22:27 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 13 Jul 2009 22:27:52 +0000 (22:27 +0000)
commit709b33dc78bf7836d90cc96aaabcf7835dc05b6b
tree9f9c973c2b48cd604c8efbb2a137f6dab7ea9edd
parentddf9f99a9face1bdfc51a5107508a64432d86ad1
Canonicalize boolean +/- a constant to a select.

(I think it's reasonably clear that we want to have a canonical form for
constructs like this; if anyone thinks that a select is not the best
canonical form, please tell me.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75531 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/zext-bool-add-sub.ll [new file with mode: 0644]