brintos

brintos / llvm-project-archived public Read only

0
0
Text · 951 B · 19dee8b Raw
22 lines · plain
1; RUN: opt < %s -mtriple=x86_64-apple-darwin -mcpu=broadwell -mattr=+avx2 -S | FileCheck %s2 3; Check that opt can add but not rewrite function attributes4; target-cpu and target-features using command line options -mcpu and5; -mattr.6 7; CHECK: attributes #0 = { nounwind ssp memory(none) uwtable "target-cpu"="broadwell" "target-features"="+ssse3,+cx16,+sse,+sse2,+sse3,+avx2" "use-soft-float"="false" }8; CHECK: attributes #1 = { nounwind ssp memory(none) uwtable "target-cpu"="core2" "target-features"="+ssse3,+cx16,+sse,+sse2,+sse3,+avx2" "use-soft-float"="false" }9 10define i32 @no_target_cpu() #0 {11entry:12  ret i32 013}14 15define i32 @has_targe_cpu() #1 {16entry:17  ret i32 018}19 20attributes #0 = { nounwind readnone ssp uwtable "target-features"="+ssse3,+cx16,+sse,+sse2,+sse3" "use-soft-float"="false" }21attributes #1 = { nounwind readnone ssp uwtable "target-cpu"="core2" "target-features"="+ssse3,+cx16,+sse,+sse2,+sse3" "use-soft-float"="false" }22