From 8ed77fd29e289a591df16390049a8e94f3c62b04 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 12 Oct 2024 16:17:34 +0000 Subject: Update tests for 32bit targets --- tests/codegen/range-attribute.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/codegen/range-attribute.rs') diff --git a/tests/codegen/range-attribute.rs b/tests/codegen/range-attribute.rs index bb19bec0fb9..456b28fc535 100644 --- a/tests/codegen/range-attribute.rs +++ b/tests/codegen/range-attribute.rs @@ -1,6 +1,10 @@ // Checks that range metadata gets emitted on functions result and arguments // with scalar value. +// 32-bit systems will return 128bit values using a return area pointer. +//@ revisions: bit32 bit64 +//@[bit32] only-32bit +//@[bit64] only-64bit //@ compile-flags: -O -C no-prepopulate-passes //@ min-llvm-version: 19 @@ -13,7 +17,8 @@ use std::num::NonZero; #[no_mangle] pub fn helper(_: usize) {} -// CHECK: noundef range(i128 1, 0) i128 @nonzero_int(i128 noundef range(i128 1, 0) %x) +// bit32: void @nonzero_int({{.*}} sret([16 x i8]) {{.*}}, i128 noundef range(i128 1, 0) %x) +// bit64: noundef range(i128 1, 0) i128 @nonzero_int(i128 noundef range(i128 1, 0) %x) #[no_mangle] pub fn nonzero_int(x: NonZero) -> NonZero { x @@ -43,7 +48,9 @@ pub enum Enum1 { C(u64), } -// CHECK: { [[ENUM1_TYP:i[0-9]+]], i64 } @enum1_value([[ENUM1_TYP]] noundef range([[ENUM1_TYP]] 0, 3) %x.0, i64 noundef %x.1) +// bit32: void @enum1_value({{.*}} sret([16 x i8]) {{[^,]*}}, [[ENUM1_TYP:i[0-9]+]] +// bit64: { [[ENUM1_TYP:i[0-9]+]], i64 } @enum1_value([[ENUM1_TYP]] +// CHECK-SAME: noundef range([[ENUM1_TYP]] 0, 3) %x.0, i64 noundef %x.1) #[no_mangle] pub fn enum1_value(x: Enum1) -> Enum1 { x -- cgit 1.4.1-3-g733a5