From 5f66c4192111e4fda5ccbdb714e97e18ac6adcc4 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 26 May 2023 14:53:24 +0000 Subject: [PATCH] Add regression test --- tests/codegen/const_scalar_pair.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/codegen/const_scalar_pair.rs diff --git a/tests/codegen/const_scalar_pair.rs b/tests/codegen/const_scalar_pair.rs new file mode 100644 index 000000000000..16e6484585c9 --- /dev/null +++ b/tests/codegen/const_scalar_pair.rs @@ -0,0 +1,10 @@ +// compile-flags: --crate-type=lib -Copt-level=0 -Zmir-opt-level=0 -C debuginfo=2 + +// CHECK: @0 = private unnamed_addr constant <{ [8 x i8] }> <{ [8 x i8] c"\01\00\00\00\02\00\00\00" }>, align 4 + +#![feature(inline_const)] + +pub fn foo() -> (i32, i32) { + // CHECK: %0 = load i32, ptr @0, align 4 + const { (1, 2) } +}