1111// compile-flags: -C no-prepopulate-passes
1212
1313#![ crate_type = "lib" ]
14+ #![ feature( rustc_attrs) ]
1415
1516// Below, these constants are defined as enum variants that by itself would
1617// have a lower alignment than the enum type. Ensure that we mark them
@@ -39,18 +40,21 @@ pub static STATIC: E<i16, i32> = E::A(0);
3940
4041// CHECK-LABEL: @static_enum_const
4142#[ no_mangle]
43+ #[ rustc_no_mir] // FIXME #27840 MIR has different codegen.
4244pub fn static_enum_const ( ) -> E < i16 , i32 > {
4345 STATIC
4446}
4547
4648// CHECK-LABEL: @inline_enum_const
4749#[ no_mangle]
50+ #[ rustc_no_mir] // FIXME #27840 MIR has different codegen.
4851pub fn inline_enum_const ( ) -> E < i8 , i16 > {
4952 E :: A ( 0 )
5053}
5154
5255// CHECK-LABEL: @low_align_const
5356#[ no_mangle]
57+ #[ rustc_no_mir] // FIXME #27840 MIR has different codegen.
5458pub fn low_align_const ( ) -> E < i16 , [ i16 ; 3 ] > {
5559// Check that low_align_const and high_align_const use the same constant
5660// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]+}}, i8* {{.*}} [[LOW_HIGH:@const[0-9]+]]
@@ -59,6 +63,7 @@ pub fn low_align_const() -> E<i16, [i16; 3]> {
5963
6064// CHECK-LABEL: @high_align_const
6165#[ no_mangle]
66+ #[ rustc_no_mir] // FIXME #27840 MIR has different codegen.
6267pub fn high_align_const ( ) -> E < i16 , i32 > {
6368// Check that low_align_const and high_align_const use the same constant
6469// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]}}, i8* {{.*}} [[LOW_HIGH]]
0 commit comments