[llvm] r332637 - [ARM] preserve test intent by removing undef

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 11:08:27 PDT 2018


Author: spatel
Date: Thu May 17 11:08:27 2018
New Revision: 332637

URL: http://llvm.org/viewvc/llvm-project?rev=332637&view=rev
Log:
[ARM] preserve test intent by removing undef

We need to clean up the DAG floating-point undef logic.
This process is similar to how we handled integer undef
logic in https://reviews.llvm.org/D43141.

And as we did there, I'm trying to reduce the patch by
changing tests that would probably become meaningless
once we correct FP undef folding.

Follow-up to:
https://reviews.llvm.org/rL332538
...because that change wasn't enough.

Modified:
    llvm/trunk/test/CodeGen/ARM/reg_sequence.ll

Modified: llvm/trunk/test/CodeGen/ARM/reg_sequence.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/reg_sequence.ll?rev=332637&r1=332636&r2=332637&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/reg_sequence.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/reg_sequence.ll Thu May 17 11:08:27 2018
@@ -269,16 +269,16 @@ define arm_aapcs_vfpcc float @t9(%0* noc
 }
 
 ; PR7162
-define arm_aapcs_vfpcc i32 @t10() nounwind {
+define arm_aapcs_vfpcc i32 @t10(float %x) nounwind {
 entry:
 ; CHECK-LABEL: t10:
 ; CHECK: vmov.i32 q[[Q0:[0-9]+]], #0x3f000000
 ; CHECK: vmul.f32 q8, q8, d[[DREG:[0-1]+]]
 ; CHECK: vadd.f32 q8, q8, q8
   %0 = shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
-  %1 = insertelement <4 x float> %0, float undef, i32 1 ; <<4 x float>> [#uses=1]
-  %2 = insertelement <4 x float> %1, float undef, i32 2 ; <<4 x float>> [#uses=1]
-  %3 = insertelement <4 x float> %2, float undef, i32 3 ; <<4 x float>> [#uses=1]
+  %1 = insertelement <4 x float> %0, float %x, i32 1 ; <<4 x float>> [#uses=1]
+  %2 = insertelement <4 x float> %1, float %x, i32 2 ; <<4 x float>> [#uses=1]
+  %3 = insertelement <4 x float> %2, float %x, i32 3 ; <<4 x float>> [#uses=1]
   %tmp54.i = bitcast <4 x float> %3 to <2 x double> ; <<2 x double>> [#uses=1]
   %4 = extractelement <2 x double> %tmp54.i, i32 1 ; <double> [#uses=1]
   %5 = bitcast double %4 to <2 x float>           ; <<2 x float>> [#uses=1]




More information about the llvm-commits mailing list