brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · f48e423 Raw
52 lines · plain
1; RUN: opt < %s -passes=gvn-hoist -S | FileCheck %s2 3; This test is meant to make sure that MemorySSAUpdater works correctly4; in non-trivial cases.5 6; CHECK: if.else218:7; CHECK-NEXT: %0 = load i32, ptr undef, align 48 9target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"10 11%s = type { i32, ptr, [3 x i8], i8 }12 13define void @test(i1 %arg) {14entry:15  br label %cond.end11816 17cond.end118:                                      ; preds = %entry18  br i1 %arg, label %cleanup, label %if.end15519 20if.end155:                                        ; preds = %cond.end11821  br label %while.cond22 23while.cond:                                       ; preds = %while.body, %if.end15524  br i1 %arg, label %while.end, label %while.body25 26while.body:                                       ; preds = %while.cond27  br label %while.cond28 29while.end:                                        ; preds = %while.cond30  switch i32 undef, label %if.else218 [31    i32 1, label %cleanup32    i32 0, label %if.then17433  ]34 35if.then174:                                       ; preds = %while.end36  unreachable37 38if.else218:                                       ; preds = %while.end39  br i1 %arg, label %if.then226, label %if.else32640 41if.then226:                                       ; preds = %if.else21842  %0 = load i32, ptr undef, align 443  unreachable44 45if.else326:                                       ; preds = %if.else21846  %1 = load i32, ptr undef, align 447  unreachable48 49cleanup:                                          ; preds = %while.end, %cond.end11850  ret void51}52