-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Support uimm32 immediates in RISCVInstrInfo::movImm for RV32. #88464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don’t think it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is correct. The stack offset needs to be 0xfffff800 as an unsigned number. Which is -2048. |
||
; CHECK-NEXT: sub sp, sp, a0 | ||
; CHECK-NEXT: .cfi_def_cfa_offset -16 | ||
; CHECK-NEXT: addi a0, sp, 4 | ||
; CHECK-NEXT: call use | ||
; CHECK-NEXT: li a0, -2048 | ||
; CHECK-NEXT: add sp, sp, a0 | ||
; CHECK-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload | ||
; CHECK-NEXT: addi sp, sp, 2032 | ||
; CHECK-NEXT: ret | ||
%1 = alloca [1073741818 x i32], align 4 | ||
call void @use(ptr %1) | ||
ret void | ||
} | ||
|
||
declare void @use(ptr) |
Uh oh!
There was an error while loading. Please reload this page.