[llvm] r253784 - move a single test case to where most other instcombine shuffle bug test cases exist
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 21 08:12:59 PST 2015
Author: spatel
Date: Sat Nov 21 10:12:58 2015
New Revision: 253784
URL: http://llvm.org/viewvc/llvm-project?rev=253784&view=rev
Log:
move a single test case to where most other instcombine shuffle bug test cases exist
Removed:
llvm/trunk/test/Transforms/InstCombine/pr20059.ll
Modified:
llvm/trunk/test/Transforms/InstCombine/vec_shuffle.ll
Removed: llvm/trunk/test/Transforms/InstCombine/pr20059.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/pr20059.ll?rev=253783&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/pr20059.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/pr20059.ll (removed)
@@ -1,16 +0,0 @@
-; RUN: opt -S -instcombine < %s | FileCheck %s
-
-; In PR20059 ( http://llvm.org/pr20059 ), shufflevector operations are reordered/removed
-; for an srem operation. This is not a valid optimization because it may cause a trap
-; on div-by-zero.
-
-; CHECK-LABEL: @do_not_reorder
-; CHECK: %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, <4 x i32> zeroinitializer
-; CHECK-NEXT: %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, <4 x i32> zeroinitializer
-; CHECK-NEXT: %retval = srem <4 x i32> %splat1, %splat2
-define <4 x i32> @do_not_reorder(<4 x i32> %p1, <4 x i32> %p2) {
- %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, <4 x i32> zeroinitializer
- %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, <4 x i32> zeroinitializer
- %retval = srem <4 x i32> %splat1, %splat2
- ret <4 x i32> %retval
-}
Modified: llvm/trunk/test/Transforms/InstCombine/vec_shuffle.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_shuffle.ll?rev=253784&r1=253783&r2=253784&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vec_shuffle.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vec_shuffle.ll Sat Nov 21 10:12:58 2015
@@ -406,6 +406,21 @@ define i32 @pr19737(<4 x i32> %in0) {
ret i32 %rv
}
+; In PR20059 ( http://llvm.org/pr20059 ), shufflevector operations are reordered/removed
+; for an srem operation. This is not a valid optimization because it may cause a trap
+; on div-by-zero.
+
+define <4 x i32> @pr20059(<4 x i32> %p1, <4 x i32> %p2) {
+; CHECK-LABEL: @pr20059(
+; CHECK-NEXT: %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, <4 x i32> zeroinitializer
+; CHECK-NEXT: %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, <4 x i32> zeroinitializer
+; CHECK-NEXT: %retval = srem <4 x i32> %splat1, %splat2
+ %splat1 = shufflevector <4 x i32> %p1, <4 x i32> undef, <4 x i32> zeroinitializer
+ %splat2 = shufflevector <4 x i32> %p2, <4 x i32> undef, <4 x i32> zeroinitializer
+ %retval = srem <4 x i32> %splat1, %splat2
+ ret <4 x i32> %retval
+}
+
define <4 x i32> @pr20114(<4 x i32> %__mask) {
; CHECK-LABEL: @pr20114
; CHECK: shufflevector
More information about the llvm-commits
mailing list