brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 1329ac6 Raw
54 lines · plain
1; RUN: opt < %s -passes='sroa,adce' -adce-remove-loops -S | FileCheck %s2; ModuleID = 'test1.bc'3source_filename = "test1.c"4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7; Function Attrs: nounwind uwtable8define i32 @foo(i32, i32, i32) {9  %4 = alloca i32, align 410  %5 = alloca i32, align 411  %6 = alloca i32, align 412  %7 = alloca i32, align 413  %8 = alloca i32, align 414  store i32 %0, ptr %4, align 415  store i32 %1, ptr %5, align 416  store i32 %2, ptr %6, align 417  store i32 0, ptr %7, align 418  %9 = load i32, ptr %5, align 419  %I10 = icmp ne i32 %9, 020  br i1 %I10, label %B11, label %B2121 22B11:23  store i32 0, ptr %8, align 424  br label %B1225 26B12:27  %I13 = load i32, ptr %8, align 428  %I14 = load i32, ptr %6, align 429  %I15 = icmp slt i32 %I13, %I1430; CHECK: br label %B2031  br i1 %I15, label %B16, label %B2032 33B16:34  br label %B1735 36B17:37  %I18 = load i32, ptr %8, align 438  %I19 = add nsw i32 %I18, 139  store i32 %I19, ptr %8, align 440  br label %B1241 42B20:43  store i32 1, ptr %7, align 444  br label %B2145 46B21:47  %I22 = load i32, ptr %7, align 448  ret i32 %I2249}50 51!llvm.ident = !{!0}52 53!0 = !{!"clang version 4.0.0"}54