[PATCH] D22225: [x86, SSE] optimize pcmp results better (PR28484)
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 11:42:49 PDT 2016
delena added a subscriber: delena.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:28139
@@ +28138,3 @@
+ SDValue Op1 = peekThroughBitcasts(N->getOperand(1));
+ if (Op0.getOpcode() != X86ISD::PCMPEQ && Op0.getOpcode() != X86ISD::PCMPGT)
+ return SDValue();
----------------
We cam mark nodes like PCMP with AssertSext. And use this marker to simplify AND.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:28148
@@ +28147,3 @@
+ unsigned EltBitWidth = VT0.getScalarType().getSizeInBits();
+ if (VT0 != VT1 || EltBitWidth == 8)
+ return SDValue();
----------------
VT0 is always equal to VT1.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:28152
@@ +28151,3 @@
+ // TODO: Is this possible or worthwhile for AVX-512 variants?
+ if (VT0.getSizeInBits() != 128 && VT0.getSizeInBits() != 256)
+ return SDValue();
----------------
On AVX-512 (skylake-avx512) the result is in a mask reg, also for 256 and 128 vector inputs.
http://reviews.llvm.org/D22225
More information about the llvm-commits
mailing list