[llvm] [SystemZ] Fold i16/i32/i64 logical RMW operations into memory operands in TableGen (PR #192802)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 08:00:17 PDT 2026


================
@@ -444,6 +444,27 @@ defm imm64hh16c : Immediate<i64, [{
          SystemZ::isImmHH(uint64_t(~Imm.getZExtValue()));
 }], HH16, "U16Imm">;
 
+// Immediates for the 8-bit LSB chunk of an i32, with the other bits being one.
+defm imm32ll8c : Immediate<i32, [{
+  if (!Imm.isIntN(32)) return false;
+  uint64_t Val = Imm.getZExtValue();
+  return (Val & 0xffffff00ULL) == 0xffffff00ULL;
+}], UIMM8, "U8Imm">;
+
+// Immediates for the second 8-bit LSB chunk of an i32, with the other bits
----------------
uweigand wrote:

Comment is a bit odd -- it's not the "second" chunk, it's still the LSB chunk, but of an i16 (extended to i32) rather than of an actual i32.

https://github.com/llvm/llvm-project/pull/192802


More information about the llvm-commits mailing list