brintos

brintos / llvm-project-archived public Read only

0
0
Text · 675 B · aa7da5f Raw
17 lines · plain
1; Check the size of generated variable when no option is set2; RUN: opt -S %s -O2 -o - | FileCheck -check-prefix=CHECK-LONG %s3; RUN: opt -S %s -O2 -o - -non-global-value-max-name-size=-1 | FileCheck -check-prefix=CHECK-LONG %s4; CHECK-LONG: %{{[a-z]{4}[a-z]+}}5 6; Then check we correctly cap the size of newly generated non-global values name7; Force the size to be small so that the check works on release and debug build8; RUN: opt -S %s -O2 -o - -non-global-value-max-name-size=1 | FileCheck -check-prefix=CHECK-SHORT %s9; CHECK-SHORT-NOT: %{{[a-z][a-z]+}}10 11define i32 @f(i32 %a, i32 %b) {12  %c = add i32 %a, %b13  %d = add i32 %c, %a14  %e = add i32 %d, %b15  ret i32 %e16}17