[PATCH] D11678: [CodeGen] Fixes *absdiff* intrinsic: LangRef doc/test case improvement and corresponding code change

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 20 05:50:34 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:747
@@ +746,3 @@
+                                                         *DAG.getContext(), VT),
+                  Sub, DAG.getConstant(0, dl, VT), DAG.getCondCode(ISD::SETGE));
+  SDValue Neg = DAG.getNode(ISD::SUB, dl, VT, DAG.getConstant(0, dl, VT), Sub, &Flags);
----------------
ashahid wrote:
> hfinkel wrote:
> > Should this be ISD::SETGE for both the signed and unsigned case?
> Here ISD::SETGE is for signed case only, unsigned case is handled with early exit.
Okay, I see, you're using the TRUNCATE above.


http://reviews.llvm.org/D11678





More information about the llvm-commits mailing list