diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:30:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:30:13 +0000 |
| commit | a303c417bbdb53703c2c17398b08486bde78f1f6 (patch) | |
| tree | 98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /test/Transforms/LoopUnswitch | |
| parent | 12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff) | |
Notes
Diffstat (limited to 'test/Transforms/LoopUnswitch')
| -rw-r--r-- | test/Transforms/LoopUnswitch/pr32818.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/LoopUnswitch/pr32818.ll b/test/Transforms/LoopUnswitch/pr32818.ll new file mode 100644 index 000000000000..cda66c9dd361 --- /dev/null +++ b/test/Transforms/LoopUnswitch/pr32818.ll @@ -0,0 +1,19 @@ +; Check that the call doesn't get removed even if +; it has no uses. It could have side-effects. +; RUN: opt -loop-unswitch -S %s | FileCheck %s + +; CHECK-LABEL: @tinky +define i32 @tinkywinky(i8 %patatino) { + %cmp1 = icmp slt i8 %patatino, 5 + br label %body +body: + %i = select i1 %cmp1, i8 6, i8 undef + br i1 true, label %body, label %end +end: + %split = phi i8 [ %i, %body ] + %conv4 = sext i8 %split to i32 +; CHECK: tail call fastcc i32 @fn5( + %call = tail call fastcc i32 @fn5(i32 %conv4) + ret i32 0 +} +declare fastcc i32 @fn5(i32 returned) unnamed_addr |
