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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 15:20:11 PDT 2018


Author: spatel
Date: Wed May 16 15:20:11 2018
New Revision: 332537

URL: http://llvm.org/viewvc/llvm-project?rev=332537&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 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.

Modified:
    llvm/trunk/test/CodeGen/ARM/spill-q.ll

Modified: llvm/trunk/test/CodeGen/ARM/spill-q.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/spill-q.ll?rev=332537&r1=332536&r2=332537&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/spill-q.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/spill-q.ll Wed May 16 15:20:11 2018
@@ -53,17 +53,17 @@ bb4:
   %4 = fadd <4 x float> %3, %part0.0.0261         ; <<4 x float>> [#uses=1]
   %5 = shufflevector <4 x float> %3, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1]
   %6 = shufflevector <2 x float> %5, <2 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x float>> [#uses=1]
-  %7 = fmul <4 x float> %1, undef                 ; <<4 x float>> [#uses=1]
+  %7 = fmul <4 x float> %1, %1
   %8 = fadd <4 x float> %7, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01> ; <<4 x float>> [#uses=1]
   %9 = fptosi <4 x float> %8 to <4 x i32>         ; <<4 x i32>> [#uses=1]
   %10 = sitofp <4 x i32> %9 to <4 x float>        ; <<4 x float>> [#uses=1]
   %11 = fmul <4 x float> %10, %2                  ; <<4 x float>> [#uses=1]
-  %12 = fmul <4 x float> undef, %6                ; <<4 x float>> [#uses=1]
+  %12 = fmul <4 x float> %6, %6
   %13 = fmul <4 x float> %11, %4                  ; <<4 x float>> [#uses=1]
   %14 = fsub <4 x float> %12, %13                 ; <<4 x float>> [#uses=1]
-  %15 = fsub <4 x float> %14, undef               ; <<4 x float>> [#uses=1]
+  %15 = fsub <4 x float> %14, %14
   %16 = fmul <4 x float> %15, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00> ; <<4 x float>> [#uses=1]
-  %17 = fadd <4 x float> %16, undef               ; <<4 x float>> [#uses=1]
+  %17 = fadd <4 x float> %16, %16
   %18 = fmul <4 x float> %17, %val173             ; <<4 x float>> [#uses=1]
   %19 = shufflevector <4 x float> %18, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1]
   %20 = shufflevector <2 x float> %19, <2 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]




More information about the llvm-commits mailing list