[llvm] r212165 - InstCombine: Add a vector variant test for PR20186
David Majnemer
david.majnemer at gmail.com
Tue Jul 1 23:14:14 PDT 2014
Author: majnemer
Date: Wed Jul 2 01:14:13 2014
New Revision: 212165
URL: http://llvm.org/viewvc/llvm-project?rev=212165&view=rev
Log:
InstCombine: Add a vector variant test for PR20186
No functional change, just adding more test coverage that was meant to
go in with r212164.
Modified:
llvm/trunk/test/Transforms/InstCombine/sub.ll
Modified: llvm/trunk/test/Transforms/InstCombine/sub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sub.ll?rev=212165&r1=212164&r2=212165&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/sub.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/sub.ll Wed Jul 2 01:14:13 2014
@@ -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, <i64 3, i64 4>
- %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, <i32 -2147483648, i32 -2147483648>
+ %sub = sub nsw <2 x i32> zeroinitializer, %div
+ ret <2 x i32> %sub
; CHECK-LABEL: @test37(
-; CHECK-NEXT: %sub = mul <2 x i64> %A, <i64 7, i64 15>
-; CHECK-NEXT: ret <2 x i64> %sub
+; CHECK-NEXT: [[DIV:%.*]] = sdiv <2 x i32> %A, <i32 -2147483648, i32 -2147483648>
+; CHECK-NEXT: [[SUB:%.*]] = sub nsw <2 x i32> zeroinitializer, %div
+; CHECK-NEXT: ret <2 x i32> [[SUB]]
}
define i32 @test38(i32 %A) {
More information about the llvm-commits
mailing list