Skip to content

Fix RISC-V Test Failures in ./x test for Multiple Codegen Cases #144565

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/codegen-llvm/enum/enum-aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ fn make_none_bool() -> Option<bool> {

#[no_mangle]
fn make_some_ordering(x: Ordering) -> Option<Ordering> {
// CHECK-LABEL: i8 @make_some_ordering(i8 %x)
// CHECK-LABEL: i8 @make_some_ordering(i8{{.*}}%x)
// CHECK-NEXT: start:
// CHECK-NEXT: ret i8 %x
Some(x)
}

#[no_mangle]
fn make_some_u16(x: u16) -> Option<u16> {
// CHECK-LABEL: { i16, i16 } @make_some_u16(i16 %x)
// CHECK-LABEL: { i16, i16 } @make_some_u16(i16{{.*}}%x)
// CHECK-NEXT: start:
// CHECK-NEXT: %0 = insertvalue { i16, i16 } { i16 1, i16 poison }, i16 %x, 1
// CHECK-NEXT: ret { i16, i16 } %0
Expand All @@ -52,7 +52,7 @@ fn make_none_u16() -> Option<u16> {

#[no_mangle]
fn make_some_nzu32(x: NonZero<u32>) -> Option<NonZero<u32>> {
// CHECK-LABEL: i32 @make_some_nzu32(i32 %x)
// CHECK-LABEL: i32 @make_some_nzu32(i32{{.*}}%x)
// CHECK-NEXT: start:
// CHECK-NEXT: ret i32 %x
Some(x)
Expand Down Expand Up @@ -114,7 +114,7 @@ fn make_uninhabited_err_indirectly(n: Never) -> Result<u32, Never> {
fn make_fully_uninhabited_result(v: u32, n: Never) -> Result<(u32, Never), (Never, u32)> {
// Actually reaching this would be UB, so we don't actually build a result.

// CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32 %v)
// CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32{{.*}}%v)
// CHECK-NEXT: start:
// CHECK-NEXT: call void @llvm.trap()
// CHECK-NEXT: call void @llvm.trap()
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen-llvm/enum/enum-match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ pub enum Tricky {

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

// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef %e)
// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef{{.*}}%e)
// CHECK-NEXT: start:
// CHECK-NEXT: %[[REL_VAR:.+]] = add i8 %e, -66
// CHECK-NEXT: %[[IS_NICHE:.+]] = icmp ult i8 %[[REL_VAR]], -56
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen-llvm/enum/enum-transparent-extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub enum Never {}

#[no_mangle]
pub fn make_unmake_result_never(x: i32) -> i32 {
// CHECK-LABEL: define i32 @make_unmake_result_never(i32 %x)
// CHECK-LABEL: define i32 @make_unmake_result_never(i32{{.*}}%x)
// CHECK: start:
// CHECK-NEXT: ret i32 %x

Expand Down
4 changes: 2 additions & 2 deletions tests/codegen-llvm/repeat-operand-zero-len.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#[repr(transparent)]
pub struct Wrapper<T, const N: usize>([T; N]);

// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef %x)
// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef{{.*}}%x)
// CHECK-NEXT: start:
// CHECK-NOT: alloca
// CHECK-NEXT: ret void
Expand All @@ -23,6 +23,6 @@ pub fn do_repeat<T: Copy, const N: usize>(x: T) -> Wrapper<T, N> {
// CHECK-LABEL: @trigger_repeat_zero_len
#[no_mangle]
pub fn trigger_repeat_zero_len() -> Wrapper<u32, 0> {
// CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef 4)
// CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef{{.*}}4)
do_repeat(4)
}
2 changes: 1 addition & 1 deletion tests/codegen-llvm/uninhabited-transparent-return-abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn test_uninhabited_ret_by_ref() {
pub fn test_uninhabited_ret_by_ref_with_arg(rsi: u32) {
// CHECK: %_2 = alloca [24 x i8], align {{8|4}}
// CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %_2)
// CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef %rsi) #2
// CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef{{.*}}%rsi) #2
// CHECK-NEXT: unreachable
unsafe {
opaque_with_arg(rsi);
Expand Down
Loading