[PATCH] D20289: [InstCombine] check vector elements before trying to transform LE/GE vector icmp (PR27756)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 10:07:22 PDT 2016


spatel created this revision.
spatel added reviewers: jmolloy, majnemer, chandlerc.
spatel added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

Fix a bug introduced with rL269426 :
[InstCombine] canonicalize* LE/GE vector integer comparisons to LT/GT (PR26701, PR26819)

We were assuming that a ConstantDataVector / ConstantVector / ConstantAggregateZero operand of an ICMP was composed of ConstantInt elements, but it might have ConstantExpr or UndefValue elements. Handle those appropriately.

http://reviews.llvm.org/D20289

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/icmp-vec.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20289.57363.patch
Type: text/x-patch
Size: 4323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160516/5bda3c5b/attachment.bin>


More information about the llvm-commits mailing list