From: David Majnemer Date: Wed, 2 Jul 2014 06:14:13 +0000 (+0000) Subject: InstCombine: Add a vector variant test for PR20186 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=35f5448c520b506c718364ecb3081fdfb89f279a;p=oota-llvm.git InstCombine: Add a vector variant test for PR20186 No functional change, just adding more test coverage that was meant to go in with r212164. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212165 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll index a9dffe793a1..5ff0ed5b40c 100644 --- a/test/Transforms/InstCombine/sub.ll +++ b/test/Transforms/InstCombine/sub.ll @@ -445,13 +445,14 @@ define <2 x i64> @test36(<2 x i64> %A) { ; CHECK-NEXT: ret <2 x i64> %sub } -define <2 x i64> @test37(<2 x i64> %A) { - %shl = shl <2 x i64> %A, - %sub = sub <2 x i64> %shl, %A - ret <2 x i64> %sub +define <2 x i32> @test37(<2 x i32> %A) { + %div = sdiv <2 x i32> %A, + %sub = sub nsw <2 x i32> zeroinitializer, %div + ret <2 x i32> %sub ; CHECK-LABEL: @test37( -; CHECK-NEXT: %sub = mul <2 x i64> %A, -; CHECK-NEXT: ret <2 x i64> %sub +; CHECK-NEXT: [[DIV:%.*]] = sdiv <2 x i32> %A, +; CHECK-NEXT: [[SUB:%.*]] = sub nsw <2 x i32> zeroinitializer, %div +; CHECK-NEXT: ret <2 x i32> [[SUB]] } define i32 @test38(i32 %A) {