[PATCH] D22814: [X86][SSE] Optimize the truncation of vector comparison results with PACKSS
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 10:30:38 PDT 2016
mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14150
@@ +14149,3 @@
+ // No truncation required, we might get here due to recursive calls.
+ if (SrcVT == DstVT)
+ return In;
----------------
Ah, ok, this makes sense.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14185
@@ +14184,3 @@
+ Lo = DAG.getBitcast(MVT::v16i16, Lo);
+ Hi = DAG.getBitcast(MVT::v16i16, Hi);
+ SDValue Res = DAG.getNode(X86ISD::PACKSS, DL, MVT::v32i8, Lo, Hi);
----------------
Oh, I just completely missed that in the definition of the VEX.256-encoded versions.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14200
@@ +14199,3 @@
+ return truncateVectorCompareWithPACKSS(DstVT, Res, DL, DAG, Subtarget);
+ }
+
----------------
Never mind, I completely misread the code (hence the greater -> smaller comment).
Forget I said anything.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14283
@@ +14282,3 @@
+ // we are saturating+packing zero/all bits only.
+ auto IsPackableComparison = [](SDValue V) {
+ unsigned Opcode = V.getOpcode();
----------------
Sounds good.
Repository:
rL LLVM
https://reviews.llvm.org/D22814
More information about the llvm-commits
mailing list