Skip to content

Commit 1fb3963

Browse files
Rollup merge of #157249 - vadorovsky:vad/llvm-codegen-bpf-alu32, r=nikic
tests: codegen-llvm: Update bpf-alu32 with the new LLVM attributes The LLVM backend now emits `noundef zeroext` on `i8` return values and `noundef` on `i8` parameters. Update the FileCheck pattern to match. r? @nagisa
2 parents 92aab95 + 177a0ec commit 1fb3963

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

tests/codegen-llvm/bpf-alu32.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
//@ only-bpf
1+
//@ add-minicore
2+
//@ compile-flags: --target=bpfel-unknown-none -C opt-level=0
3+
//@ needs-llvm-components: bpf
24
#![crate_type = "lib"]
3-
#![feature(bpf_target_feature)]
5+
#![feature(bpf_target_feature, no_core)]
6+
#![no_core]
47
#![no_std]
58

9+
extern crate minicore;
10+
use minicore::*;
11+
612
#[no_mangle]
713
#[target_feature(enable = "alu32")]
8-
// CHECK: define i8 @foo(i8 returned %arg) unnamed_addr #0
14+
// CHECK: define {{.*}}i8 @foo(i8 {{.*}}%arg) unnamed_addr #0
15+
// CHECK: attributes #0 = { {{.*}}"target-features"="{{[^"]*}}+alu32{{.*}} }
916
pub unsafe fn foo(arg: u8) -> u8 {
1017
arg
1118
}

0 commit comments

Comments
 (0)