[PATCH] D140119: [PowerPC][GIsel] Materialize i64 constants.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 10:24:53 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCInstructionSelector.cpp:359
+// zeros and return the number of bits by the left of these consecutive zeros.
+static int findContiguousZerosAtLeast(uint64_t Imm, unsigned Num) {
+ unsigned HiTZ = countTrailingZeros<uint32_t>(Hi_32(Imm));
----------------
Stick with uint32_t return type?
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCInstructionSelector.cpp:361
+ unsigned HiTZ = countTrailingZeros<uint32_t>(Hi_32(Imm));
+ unsigned LoLZ = countLeadingZeros<uint32_t>(Lo_32(Imm));
+ if ((HiTZ + LoLZ) >= Num)
----------------
uint32_t throughout?
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCInstructionSelector.cpp:542
+ .addImm(0);
+ return constrainSelectedInstRegOperands(*MI, TII, TRI, RBI);
+ }
----------------
BuildMI actually has a .constrainAllUses(). Can use that and drop this MI argument used everywhere?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140119/new/
https://reviews.llvm.org/D140119
More information about the llvm-commits
mailing list