brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 7e6678f Raw
62 lines · plain
1; RUN: llc -O1 -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-Ox2; RUN: llc -O2 -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-Ox3; RUN: llc -O3 -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-Ox4; RUN: llc -misched-postra -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-MORE5; RUN: llc -O1 -debug-only=isel %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=FAST6; RUN: llc -O1 -debug-only=isel -fast-isel=false %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=NOFAST7 8; REQUIRES: asserts, default_triple9; UNSUPPORTED: target=nvptx{{.*}}10 11; This test verifies that we don't run Machine Function optimizations12; on optnone functions, and that we can turn off FastISel.13 14; Function Attrs: noinline optnone15define i32 @_Z3fooi(i32 %x) #0 {16entry:17  %x.addr = alloca i32, align 418  store i32 %x, ptr %x.addr, align 419  br label %while.cond20 21while.cond:                                       ; preds = %while.body, %entry22  %0 = load i32, ptr %x.addr, align 423  %dec = add nsw i32 %0, -124  store i32 %dec, ptr %x.addr, align 425  %tobool = icmp ne i32 %0, 026  br i1 %tobool, label %while.body, label %while.end27 28while.body:                                       ; preds = %while.cond29  br label %while.cond30 31while.end:                                        ; preds = %while.cond32  ret i32 033}34 35attributes #0 = { optnone noinline }36 37; Nothing that runs at -O0 gets skipped.38; LLC-O0-NOT: Skipping pass39 40; Machine Function passes run at -O1 and higher.41; LLC-Ox-DAG: Skipping pass 'Branch Probability Basic Block Placement'42; LLC-Ox-DAG: Skipping pass 'CodeGen Prepare'43; LLC-Ox-DAG: Skipping pass 'Control Flow Optimizer'44; LLC-Ox-DAG: Skipping pass 'Machine code sinking'45; LLC-Ox-DAG: Skipping pass 'Machine Common Subexpression Elimination'46; LLC-Ox-DAG: Skipping pass 'Shrink Wrapping analysis'47; LLC-Ox-DAG: Skipping pass 'Machine Copy Propagation Pass'48; LLC-Ox-DAG: Skipping pass 'Machine Instruction Scheduler'49; LLC-Ox-DAG: Skipping pass 'Machine Loop Invariant Code Motion'50; LLC-Ox-DAG: Skipping pass 'Optimize machine instruction PHIs'51; LLC-Ox-DAG: Skipping pass 'Peephole Optimizations'52; LLC-Ox-DAG: Skipping pass 'Post{{.*}}RA{{.*}}{{[Ss]}}cheduler'53; LLC-Ox-DAG: Skipping pass 'Remove dead machine instructions'54; LLC-Ox-DAG: Skipping pass 'Tail Duplication'55 56; Alternate post-RA scheduler.57; LLC-MORE: Skipping pass 'PostRA Machine Instruction Scheduler'58 59; Selectively disable FastISel for optnone functions.60; FAST:   FastISel is enabled61; NOFAST: FastISel is disabled62