brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 6229a3f Raw
39 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=attributes --test FileCheck --test-arg -check-prefixes=INTERESTING,INTERESTING-NOINLINE --test-arg %s --test-arg --input-file %s -o %t.02; RUN: FileCheck --check-prefix=RESULT-NOINLINE %s < %t.03 4; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=attributes --test FileCheck --test-arg -check-prefixes=INTERESTING,INTERESTING-OPTNONE --test-arg %s --test-arg --input-file %s -o %t.15; RUN: FileCheck --check-prefix=RESULT-OPTNONE %s < %t.16 7 8; Make sure this doesn't hit the "Attribute 'optnone' requires9; 'noinline'!" verifier error. optnone can be dropped separately from10; noinline, but removing noinline requires removing the pair together.11 12 13; INTERESTING: @keep_func() [[KEEP_ATTRS:#[0-9]+]]14; RESULT-NOINLINE: define void @keep_func() [[KEEP_ATTRS:#[0-9]+]] {15; RESULT-OPTNONE: define void @keep_func() [[KEEP_ATTRS:#[0-9]+]] {16define void @keep_func() #0 {17  ret void18}19 20; Both should be removed together21; INTERESTING: @drop_func()22; RESULT-NOINLINE: define void @drop_func() {23; RESULT-OPTNONE: define void @drop_func() {24define void @drop_func() #0 {25  ret void26}27 28; RESULT-NOINLINE: attributes [[KEEP_ATTRS]] = { noinline }29; RESULT-OPTNONE: attributes [[KEEP_ATTRS]] = { noinline optnone }30 31 32; INTERESTING-NOINLINE: attributes [[KEEP_ATTRS]] =33; INTERESTING-NOINLINE-SAME: noinline34 35; INTERESTING-OPTNONE: attributes [[KEEP_ATTRS]] =36; INTERESTING-OPTNONE-SAME: optnone37 38attributes #0 = { noinline optnone }39