[PATCH] D42619: [X86] Make foldLogicOfSetCCs work better for vectors pre legal types/operations

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 28 23:54:51 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323631: [X86] Make foldLogicOfSetCCs work better for vectors pre legal types/operations (authored by ctopper, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42619?vs=131699&id=131747#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42619

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/trunk/test/CodeGen/X86/avx512vl-vec-cmp.ll


Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3525,7 +3525,7 @@
   // operations on the left and right operands, so those types must match.
   EVT VT = N0.getValueType();
   EVT OpVT = LL.getValueType();
-  if (LegalOperations || VT != MVT::i1)
+  if (LegalOperations || VT.getScalarType() != MVT::i1)
     if (VT != getSetCCResultType(OpVT))
       return SDValue();
   if (OpVT != RL.getValueType())
Index: llvm/trunk/test/CodeGen/X86/avx512vl-vec-cmp.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/avx512vl-vec-cmp.ll
+++ llvm/trunk/test/CodeGen/X86/avx512vl-vec-cmp.ll
@@ -1132,10 +1132,8 @@
 ; NoVLX:       # %bb.0:
 ; NoVLX-NEXT:    # kill: def %ymm3 killed %ymm3 def %zmm3
 ; NoVLX-NEXT:    # kill: def %ymm2 killed %ymm2 def %zmm2
-; NoVLX-NEXT:    # kill: def %ymm1 killed %ymm1 def %zmm1
-; NoVLX-NEXT:    # kill: def %ymm0 killed %ymm0 def %zmm0
+; NoVLX-NEXT:    vpor %ymm1, %ymm0, %ymm0
 ; NoVLX-NEXT:    vptestnmd %zmm0, %zmm0, %k1
-; NoVLX-NEXT:    vptestnmd %zmm1, %zmm1, %k1 {%k1}
 ; NoVLX-NEXT:    vpblendmd %zmm2, %zmm3, %zmm0 {%k1}
 ; NoVLX-NEXT:    # kill: def %ymm0 killed %ymm0 killed %zmm0
 ; NoVLX-NEXT:    retq


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42619.131747.patch
Type: text/x-patch
Size: 1390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180129/6b314629/attachment.bin>


More information about the llvm-commits mailing list