[llvm] [RISCV] Support constant hoisting of immediate store values (PR #96073)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 08:21:44 PDT 2024
================
@@ -211,11 +211,12 @@ exit:
; Check that we use a common base for immediates needed by a store if the
; constants require more than 1 instruction.
-; TODO: This doesn't trigger currently.
define void @test20(ptr %p1, ptr %p2) {
; CHECK-LABEL: test20
-; CHECK: store i32 15111111, ptr %p1
-; CHECK: store i32 15111112, ptr %p2
+; CHECK: %const = bitcast i32 15111111 to i32
----------------
preames wrote:
Please add test cases for:
* Imm=0 value with legal type
* Imm=0 value with illegal type
* Partially zero value with illegal type
* Misaligned case
https://github.com/llvm/llvm-project/pull/96073
More information about the llvm-commits
mailing list