[PATCH] D33188: [X86][AVX512] Improve lowering of AVX512 compare intrinsics (remove redundant shift left+right instructions).

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 05:09:16 PDT 2017


aymanmus marked 3 inline comments as done.
aymanmus added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:7907
+// k-register.
+static SDValue isTypePromotionOfi1ZeroUpBits(SDValue Op) {
+  unsigned Opc = Op.getOpcode();
----------------
igorb wrote:
> please check if you can use void SelectionDAG::computeKnownBits  and update 
> void X86TargetLowering::computeKnownBitsForTargetNode   instead
> 
I don't think we can use SelectionDAG::computeKnownBit here since its definition for vectors is to return known bits that are shared for all vector elements.
for example:

```
knownBits(<i8 00xxxxxx, i8 x00xxxxx> && <i8 xxxxxxxx, i8 xxxxxxxx>) = i8 x0xxxxxx
```
In our case, vector elements are of type i1, so known bits will always include nothing.


https://reviews.llvm.org/D33188





More information about the llvm-commits mailing list