[llvm] fix a bug of PPCMIPeepholes which description in issue 71030 (PR #85451)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 11:59:14 PDT 2024


================
@@ -2408,7 +2408,7 @@ defm SRW  : XForm_6r<31, 536, (outs gprc:$RA), (ins gprc:$RST, gprc:$RB),
                      [(set i32:$RA, (PPCsrl i32:$RST, i32:$RB))]>, ZExt32To64;
 defm SRAW : XForm_6rc<31, 792, (outs gprc:$RA), (ins gprc:$RST, gprc:$RB),
                       "sraw", "$RA, $RST, $RB", IIC_IntShift,
-                      [(set i32:$RA, (PPCsra i32:$RST, i32:$RB))]>, SExt32To64;
+                      [(set i32:$RA, (PPCsra i32:$RST, i32:$RB))]>;
----------------
amy-kwan wrote:

Group code review comment:
Is the removal of the `SExt32To64` flag truly correct? We're not sure if this instruction really makes sense in 32-bit mode. The sign extend flag should depend on the behaviour of the instruction itself (if the instruction is meant to sign extend, then presumably the flag should still be present).

It would be good investigate this.

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


More information about the llvm-commits mailing list