Alina Sbirlea | 6943472 | 2019-09-12 17:12:51 +0000 | [diff] [blame] | 1 | ; RUN: opt -S -loop-unswitch -disable-basicaa -enable-mssa-loop-dependency -verify-memoryssa < %s | FileCheck %s |
| 2 | ; REQUIRES: asserts |
| 3 | |
| 4 | target triple = "x86_64-unknown-linux-gnu" |
| 5 | |
| 6 | ; CHECK-LABEL: @foo() |
| 7 | ; Function Attrs: readnone speculatable |
| 8 | declare i32 @foo() #0 |
| 9 | |
| 10 | define void @main() { |
| 11 | entry: |
| 12 | br label %for.cond2682 |
| 13 | |
| 14 | for.cond2682: ; preds = %if.then2712, %entry |
| 15 | %mul2708 = call i32 @foo() |
| 16 | %tobool2709 = icmp ne i32 %mul2708, 0 |
| 17 | br i1 %tobool2709, label %if.then2712, label %lor.lhs.false2710 |
| 18 | |
| 19 | lor.lhs.false2710: ; preds = %for.cond2682 |
| 20 | unreachable |
| 21 | |
| 22 | if.then2712: ; preds = %for.cond2682 |
| 23 | br label %for.cond2682 |
| 24 | } |
| 25 | |
| 26 | attributes #0 = { readnone speculatable } |