[llvm] r335311 - [InstCombine] add test for shuffle-of-binops; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 16:53:01 PDT 2018


Author: spatel
Date: Thu Jun 21 16:53:01 2018
New Revision: 335311

URL: http://llvm.org/viewvc/llvm-project?rev=335311&view=rev
Log:
[InstCombine] add test for shuffle-of-binops; NFC

This shows a miscompile that was missed in rL335283.

Modified:
    llvm/trunk/test/Transforms/InstCombine/shuffle_select.ll

Modified: llvm/trunk/test/Transforms/InstCombine/shuffle_select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/shuffle_select.ll?rev=335311&r1=335310&r2=335311&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/shuffle_select.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/shuffle_select.ll Thu Jun 21 16:53:01 2018
@@ -224,3 +224,17 @@ define <4 x double> @fdiv(<4 x double> %
   ret <4 x double> %t3
 }
 
+; FIXME:
+; The variable operand must be either the first operand or second operand in both binops.
+
+define <4 x double> @frem(<4 x double> %v0) {
+; CHECK-LABEL: @frem(
+; CHECK-NEXT:    [[T3:%.*]] = frem <4 x double> <double 1.000000e+00, double 2.000000e+00, double 7.000000e+00, double 8.000000e+00>, [[V0:%.*]]
+; CHECK-NEXT:    ret <4 x double> [[T3]]
+;
+  %t1 = frem <4 x double> <double 1.0, double 2.0, double 3.0, double 4.0>, %v0
+  %t2 = frem <4 x double> %v0, <double 5.0, double 6.0, double 7.0, double 8.0>
+  %t3 = shufflevector <4 x double> %t1, <4 x double> %t2, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
+  ret <4 x double> %t3
+}
+




More information about the llvm-commits mailing list