[llvm] [TTI][RISCV] Unconditionally break critical edges to sink ADDI (PR #108889)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 21:13:01 PDT 2024


================
@@ -91,14 +87,14 @@ define i32 @f_small_edge_neg(i32 %in0) minsize {
 ; constant is medium and not fit in 6 bit (compress imm),
 ; but fit in 12 bit (imm)
 ; RV32IFDC-LABEL: <f_medium_ledge_pos>:
-; RV32IFDC: addi [[MAYZEROREG:.*]], [[REG:.*]], -0x20
-; RV32IFDC: RESBROPT [[MAYZEROREG]], [[PLACE:.*]]
+; RV32IFDC: addi [[MAYZEROREG:.*]], [[REG:.*]], -0x21
+; RV32IFDC: [[COND:c.b.*]] [[MAYZEROREG]], [[PLACE:.*]]
 ; --- no compress extension
 ; RV32IFD-LABEL: <f_medium_ledge_pos>:
-; RV32IFD: addi [[REG:.*]], zero, 0x20
-; RV32IFD: RESBRNORMAL [[ANOTHER:.*]], [[REG]], [[PLACE:.*]]
+; RV32IFD: addi [[REG:.*]], zero, 0x21
+; RV32IFD: [[COND:b.*]] [[ANOTHER:.*]], [[REG]], [[PLACE:.*]]
 define i32 @f_medium_ledge_pos(i32 %in0) minsize {
-  %cmp = icmp CMPCOND i32 %in0, 32
+  %cmp = icmp CMPCOND i32 %in0, 33
----------------
topperc wrote:

I agree this is the right test update.

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


More information about the llvm-commits mailing list