[PATCH] D99449: [GlobalISel] Implement lowering for G_ROTR and G_ROTL.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 29 02:32:22 PDT 2021


foad added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h:970
+  /// then this will create a splat vector with of \p Val.
+  MachineInstrBuilder buildConstantScalarOrVector(const DstOp &Res,
+                                                  int64_t Val);
----------------
buildConstant already does this.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:5382
+  unsigned ShOpc = IsLeft ? TargetOpcode::G_SHL : TargetOpcode::G_LSHR;
+  unsigned HsOpc = IsLeft ? TargetOpcode::G_LSHR : TargetOpcode::G_SHL;
+  auto BitWidthMinusOneC = MIRBuilder.buildConstant(AmtTy, EltSizeInBits - 1);
----------------
What does "Hs" mean?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99449/new/

https://reviews.llvm.org/D99449



More information about the llvm-commits mailing list