[PATCH] D46179: [X86] Lowering adds/addus/subs/subus intrinsics to native IR (LLVM part)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 16 15:47:17 PDT 2018


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36289
+        APInt Elt = cast<ConstantSDNode>(Op.getOperand(i))->getAPIntValue();
+        Elt = Elt.getHiBits(Elt.isSignedIntN(ExtEltSize) ? ExtPartSize + 1
+                                                         : ExtPartSize);
----------------
Why can't you just use APInt::isIntN for unsigned and APInt::isSignedIntN for signed? Why do you need to extract the high bits yourself?


Repository:
  rL LLVM

https://reviews.llvm.org/D46179





More information about the llvm-commits mailing list