SelectionDAG: create correct BooleanContent constants
authorTim Northover <tnorthover@apple.com>
Fri, 6 Sep 2013 12:38:12 +0000 (12:38 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 6 Sep 2013 12:38:12 +0000 (12:38 +0000)
commita5eeb9da054bd76b38e18bedb9015bbaf20605e0
treefb84e5619e001ec07011c68af554f0eacd9b36aa
parent888497d8a2927ddab38667d54d574c3cadeef1e5
SelectionDAG: create correct BooleanContent constants

Occasionally DAGCombiner can spot that a SETCC operation is completely
redundant and reduce it to "all true" or "all false". If this happens to a
vector, the value produced has to take account of what a normal comparison
would have produced, which may be an all-1s bitmask.

The fix in SelectionDAG.cpp is tested, however, as far as I can see the code in
TargetLowering.cpp is possibly unreachable and almost certainly irrelevant when
triggered so there are no tests. However, I believe it's still clearly the
right change and may save someone else some hassle if it suddenly becomes
reachable. So I'm doing it anyway.

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