Skip to content

Commit 8620e1f

Browse files
author
Caiweiran
committed
Fix test failure on riscv64
1 parent d1cec72 commit 8620e1f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

tests/codegen-llvm/enum/enum-aggregate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ fn make_none_bool() -> Option<bool> {
2727

2828
#[no_mangle]
2929
fn make_some_ordering(x: Ordering) -> Option<Ordering> {
30-
// CHECK-LABEL: i8 @make_some_ordering(i8 %x)
30+
// CHECK-LABEL: i8 @make_some_ordering(i8{{( signext)?}} %x)
3131
// CHECK-NEXT: start:
3232
// CHECK-NEXT: ret i8 %x
3333
Some(x)
3434
}
3535

3636
#[no_mangle]
3737
fn make_some_u16(x: u16) -> Option<u16> {
38-
// CHECK-LABEL: { i16, i16 } @make_some_u16(i16 %x)
38+
// CHECK-LABEL: { i16, i16 } @make_some_u16(i16{{( zeroext)?}} %x)
3939
// CHECK-NEXT: start:
4040
// CHECK-NEXT: %0 = insertvalue { i16, i16 } { i16 1, i16 poison }, i16 %x, 1
4141
// CHECK-NEXT: ret { i16, i16 } %0
@@ -52,7 +52,7 @@ fn make_none_u16() -> Option<u16> {
5252

5353
#[no_mangle]
5454
fn make_some_nzu32(x: NonZero<u32>) -> Option<NonZero<u32>> {
55-
// CHECK-LABEL: i32 @make_some_nzu32(i32 %x)
55+
// CHECK-LABEL: i32 @make_some_nzu32(i32{{( signext)?}} %x)
5656
// CHECK-NEXT: start:
5757
// CHECK-NEXT: ret i32 %x
5858
Some(x)
@@ -114,7 +114,7 @@ fn make_uninhabited_err_indirectly(n: Never) -> Result<u32, Never> {
114114
fn make_fully_uninhabited_result(v: u32, n: Never) -> Result<(u32, Never), (Never, u32)> {
115115
// Actually reaching this would be UB, so we don't actually build a result.
116116

117-
// CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32 %v)
117+
// CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32{{( signext)?}} %v)
118118
// CHECK-NEXT: start:
119119
// CHECK-NEXT: call void @llvm.trap()
120120
// CHECK-NEXT: call void @llvm.trap()

tests/codegen-llvm/enum/enum-match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ pub enum Tricky {
739739

740740
const _: () = assert!(std::intrinsics::discriminant_value(&Tricky::V100) == 100);
741741

742-
// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef %e)
742+
// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef{{( zeroext)?}} %e)
743743
// CHECK-NEXT: start:
744744
// CHECK-NEXT: %[[REL_VAR:.+]] = add i8 %e, -66
745745
// CHECK-NEXT: %[[IS_NICHE:.+]] = icmp ult i8 %[[REL_VAR]], -56

tests/codegen-llvm/enum/enum-transparent-extract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub enum Never {}
99

1010
#[no_mangle]
1111
pub fn make_unmake_result_never(x: i32) -> i32 {
12-
// CHECK-LABEL: define i32 @make_unmake_result_never(i32 %x)
12+
// CHECK-LABEL: define i32 @make_unmake_result_never(i32{{( signext)?}} %x)
1313
// CHECK: start:
1414
// CHECK-NEXT: ret i32 %x
1515

tests/codegen-llvm/repeat-operand-zero-len.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#[repr(transparent)]
1212
pub struct Wrapper<T, const N: usize>([T; N]);
1313

14-
// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef %x)
14+
// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef{{( signext)?}} %x)
1515
// CHECK-NEXT: start:
1616
// CHECK-NOT: alloca
1717
// CHECK-NEXT: ret void
@@ -23,6 +23,6 @@ pub fn do_repeat<T: Copy, const N: usize>(x: T) -> Wrapper<T, N> {
2323
// CHECK-LABEL: @trigger_repeat_zero_len
2424
#[no_mangle]
2525
pub fn trigger_repeat_zero_len() -> Wrapper<u32, 0> {
26-
// CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef 4)
26+
// CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef{{( signext)?}} 4)
2727
do_repeat(4)
2828
}

tests/codegen-llvm/uninhabited-transparent-return-abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn test_uninhabited_ret_by_ref() {
3636
pub fn test_uninhabited_ret_by_ref_with_arg(rsi: u32) {
3737
// CHECK: %_2 = alloca [24 x i8], align {{8|4}}
3838
// CHECK-NEXT: call void @llvm.lifetime.start.p0({{(i64 24, )?}}ptr nonnull %_2)
39-
// CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef %rsi) #2
39+
// CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef{{( signext)?}} %rsi) #2
4040
// CHECK-NEXT: unreachable
4141
unsafe {
4242
opaque_with_arg(rsi);

0 commit comments

Comments
 (0)