]> granicus.if.org Git - llvm/commit
[TargetLowering] Fix undef vector element issue with true/false result handling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 8 Nov 2016 15:07:01 +0000 (15:07 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 8 Nov 2016 15:07:01 +0000 (15:07 +0000)
commitabcddd5a2c64d79b6980a05e3e826ee0d26e68a9
tree93a03f67377b948d8bfd55ee2572b17a816fbc09
parentac54d0066c478a09c7cd28d15d0f9ff8af984afc
[TargetLowering] Fix undef vector element issue with true/false result handling

Fixed an issue with vector usage of TargetLowering::isConstTrueVal / TargetLowering::isConstFalseVal boolean result matching.

The comment said we shouldn't handle constant splat vectors with undef elements. But the the actual code was returning false if the build vector contained no undef elements....

This patch now ignores the number of undefs (getConstantSplatNode will return null if the build vector is all undefs).

The change has also unearthed a couple of missed opportunities in AVX512 comparison code that will need to be addressed.

Differential Revision: https://reviews.llvm.org/D26031

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286238 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/avx512-ext.ll
test/CodeGen/X86/avx512-vec-cmp.ll
test/CodeGen/X86/v8i1-masks.ll