[llvm] [RISCV] Support uimm32 immediates in RISCVInstrInfo::movImm for RV32. (PR #88464)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 08:44:24 PDT 2024


================
@@ -0,0 +1,26 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=riscv32 | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    addi sp, sp, -2032
+; CHECK-NEXT:    .cfi_def_cfa_offset 2032
+; CHECK-NEXT:    sw ra, 2028(sp) # 4-byte Folded Spill
+; CHECK-NEXT:    .cfi_offset ra, -4
+; CHECK-NEXT:    li a0, -2048
----------------
topperc wrote:

It is correct. The stack offset needs to be 0xfffff800 as an unsigned number. Which is -2048.

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


More information about the llvm-commits mailing list