[PATCH] D26031: [TargetLowering] Fix undef vector element issue with true/false result handling

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 06:12:09 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: chandlerc, hfinkel, delena, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

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

The comment says that 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 current iteration of the patch flips the test so that it matches the comment and only accepts build vectors with no undefs. But since this has been like this since 2014, should we take it as a sign that undefs elements are not an issue and I should update the patch to not care about undefs at all?

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


Repository:
  rL LLVM

https://reviews.llvm.org/D26031

Files:
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  test/CodeGen/X86/avx512-ext.ll
  test/CodeGen/X86/avx512-vec-cmp.ll
  test/CodeGen/X86/v8i1-masks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26031.76011.patch
Type: text/x-patch
Size: 4011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/126bc314/attachment.bin>


More information about the llvm-commits mailing list