[PATCH] D49879: [PowerPC] Generate Power9 extswsli extend sign and shift immediate instruction

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 07:40:42 PDT 2018


inouehrs added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14113
+      N0.getOperand(0).getValueType() == MVT::i32 &&
+      isConstOrConstSplat(N1)) {
+
----------------
Do you have any reason to use `isConstOrConstSplat` instead of more common `isa<ConstantSDNode>(N1)`?


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14120
+      SDValue N000 = N00.getOperand(0);
+      if (N000.getOpcode() == ISD::AssertSext)
+        return SDValue();
----------------
You don't need to use a variable `N000` since it is used only once. `N000` and `N00` seem confusing for me.


https://reviews.llvm.org/D49879





More information about the llvm-commits mailing list