[llvm] [RISCV] Support constant hoisting of immediate store values (PR #96073)
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 06:56:45 PDT 2024
================
@@ -4,10 +4,7 @@
define i1 @f() {
; CHECK-LABEL: f:
; CHECK: # %bb.0:
-; CHECK-NEXT: lui a0, 524288
-; CHECK-NEXT: not a0, a0
-; CHECK-NEXT: sltiu a0, a0, 2
-; CHECK-NEXT: xori a0, a0, 1
+; CHECK-NEXT: li a0, 1
----------------
asb wrote:
For the avoidance of doubt, this is semantically equivalent:
https://alive2.llvm.org/ce/z/8gY545
https://github.com/llvm/llvm-project/pull/96073
More information about the llvm-commits
mailing list