Skip to content

Commit a0e611c

Browse files
committed
[RISCV] Add signext attribute to i32 orc.b test for RV64 to match other Zbb tests.
Shows the sext.w at the end that would show up in C code. I'm thinking orc.b would preserve sign bits from it's input, but I'm not sure.
1 parent 03c4119 commit a0e611c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/test/CodeGen/RISCV/rv64zbb-intrinsic.ll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66

77
declare i32 @llvm.riscv.orc.b.i32(i32)
88

9-
define i32 @orcb32(i32 %a) nounwind {
9+
define signext i32 @orcb32(i32 signext %a) nounwind {
1010
; RV64IB-LABEL: orcb32:
1111
; RV64IB: # %bb.0:
1212
; RV64IB-NEXT: orc.b a0, a0
13+
; RV64IB-NEXT: sext.w a0, a0
1314
; RV64IB-NEXT: ret
1415
;
1516
; RV64IBB-LABEL: orcb32:
1617
; RV64IBB: # %bb.0:
1718
; RV64IBB-NEXT: orc.b a0, a0
19+
; RV64IBB-NEXT: sext.w a0, a0
1820
; RV64IBB-NEXT: ret
1921
%tmp = call i32 @llvm.riscv.orc.b.i32(i32 %a)
2022
ret i32 %tmp

0 commit comments

Comments
 (0)