summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-28 18:48:10 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-28 18:48:10 +0000
commite04c0e3f8d7ae06db85079948745a855f299ba14 (patch)
tree7508b3ca39767cc372f44fdecbe8202fea5c7925 /test
parent296f55f618491316b36eba75e5127b00e56e0cd1 (diff)
downloadllvm-e04c0e3f8d7ae06db85079948745a855f299ba14.tar.gz
llvm-e04c0e3f8d7ae06db85079948745a855f299ba14.tar.bz2
llvm-e04c0e3f8d7ae06db85079948745a855f299ba14.tar.xz
Revert "InstCombine: Improvement to check if signed addition overflows."
This reverts commit r209746. It looks it is causing a crash while building libcxx. I am trying to get a reduced testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/AddOverflow.ll56
1 files changed, 0 insertions, 56 deletions
diff --git a/test/Transforms/InstCombine/AddOverflow.ll b/test/Transforms/InstCombine/AddOverflow.ll
deleted file mode 100644
index 1bbd1fc59a..0000000000
--- a/test/Transforms/InstCombine/AddOverflow.ll
+++ /dev/null
@@ -1,56 +0,0 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; CHECK-LABEL: @ripple(
-; CHECK: add nsw i16 %tmp1, 1
-define i32 @ripple(i16 signext %x) {
-bb:
- %tmp = sext i16 %x to i32
- %tmp1 = and i32 %tmp, -5
- %tmp2 = trunc i32 %tmp1 to i16
- %tmp3 = sext i16 %tmp2 to i32
- %tmp4 = add i32 %tmp3, 1
- ret i32 %tmp4
-}
-
-; CHECK-LABEL: @ripplenot(
-; CHECK: add i32 %tmp3, 4
-define i32 @ripplenot(i16 signext %x) {
-bb:
- %tmp = sext i16 %x to i32
- %tmp1 = and i32 %tmp, -3
- %tmp2 = trunc i32 %tmp1 to i16
- %tmp3 = sext i16 %tmp2 to i32
- %tmp4 = add i32 %tmp3, 4
- ret i32 %tmp4
-}
-
-; CHECK-LABEL: @oppositesign(
-; CHECK: add nsw i16 %tmp1, 4
-define i32 @oppositesign(i16 signext %x) {
-bb:
- %tmp = sext i16 %x to i32
- %tmp1 = or i32 %tmp, 32768
- %tmp2 = trunc i32 %tmp1 to i16
- %tmp3 = sext i16 %tmp2 to i32
- %tmp4 = add i32 %tmp3, 4
- ret i32 %tmp4
-}
-
-; CHECK-LABEL: @ripplenot_var(
-; CHECK: add i32 %tmp6, %tmp7
-define i32 @ripplenot_var(i16 signext %x, i16 signext %y) {
-bb:
- %tmp = sext i16 %x to i32
- %tmp1 = and i32 %tmp, -5
- %tmp2 = trunc i32 %tmp1 to i16
- %tmp3 = sext i16 %y to i32
- %tmp4 = or i32 %tmp3, 2
- %tmp5 = trunc i32 %tmp4 to i16
- %tmp6 = sext i16 %tmp5 to i32
- %tmp7 = sext i16 %tmp2 to i32
- %tmp8 = add i32 %tmp6, %tmp7
- ret i32 %tmp8
-}