summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2014-12-19 14:36:24 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2014-12-19 14:36:24 +0000
commit3be15b2fa634c085ad4e37a1a85850e7326c5bef (patch)
treeabc0dd8cf177fe7092ecbb6be422408f5c936327 /llvm/test/Transforms/InstCombine
parent7fe690ce125b0c29e121729507c290cfb513e377 (diff)
downloadbcm5719-llvm-3be15b2fa634c085ad4e37a1a85850e7326c5bef.tar.gz
bcm5719-llvm-3be15b2fa634c085ad4e37a1a85850e7326c5bef.zip
Revert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"
Reverts commit r224574 to appease buildbots: The visitSwitchInst generates SUB constant expressions to recompute the switch condition. When truncating the condition to a smaller type, SUB expressions should use the previous type (before trunc) for both operands. This fixes an assertion crash. llvm-svn: 224576
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
-rw-r--r--llvm/test/Transforms/InstCombine/narrow-switch.ll30
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/test/Transforms/InstCombine/narrow-switch.ll b/llvm/test/Transforms/InstCombine/narrow-switch.ll
index f3f19bae03d..7646189b854 100644
--- a/llvm/test/Transforms/InstCombine/narrow-switch.ll
+++ b/llvm/test/Transforms/InstCombine/narrow-switch.ll
@@ -91,33 +91,3 @@ return:
%retval.0 = phi i32 [ 24, %sw.default ], [ 123, %sw.bb2 ], [ 213, %sw.bb1 ], [ 231, %entry ]
ret i32 %retval.0
}
-
-; Make sure to avoid assertion crashes and use the type before
-; truncation to generate the sub constant expressions that leads
-; to the recomputed condition.
-;
-; CHECK-LABEL: @trunc64to59
-; CHECK: switch i59
-; CHECK: i59 0, label
-; CHECK: i59 18717182647723699, label
-
-define void @trunc64to59(i64 %a) {
-entry:
- %tmp0 = and i64 %a, 15
- %tmp1 = mul i64 %tmp0, -6425668444178048401
- %tmp2 = add i64 %tmp1, 5170979678563097242
- %tmp3 = mul i64 %tmp2, 1627972535142754813
- switch i64 %tmp3, label %sw.default [
- i64 847514119312061490, label %sw.bb1
- i64 866231301959785189, label %sw.bb2
- ]
-
-sw.bb1:
- br label %sw.default
-
-sw.bb2:
- br label %sw.default
-
-sw.default:
- ret void
-}
OpenPOWER on IntegriCloud