[llvm] r332548 - [Thumb] preserve test intent by removing undef

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


Author: spatel
Date: Wed May 16 15:47:51 2018
New Revision: 332548

URL: http://llvm.org/viewvc/llvm-project?rev=332548&view=rev
Log:
[Thumb] 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/Thumb2/cross-rc-coalescing-2.ll

Modified: llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll?rev=332548&r1=332547&r2=332548&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll Wed May 16 15:47:51 2018
@@ -35,14 +35,14 @@ bb8:
   %5 = fmul float %4, %0                          ; <float> [#uses=1]
   %6 = fsub float %3, %5                          ; <float> [#uses=1]
   %7 = fmul float %4, %1                          ; <float> [#uses=1]
-  %8 = fadd float undef, %7                       ; <float> [#uses=2]
+  %8 = fadd float %7, %7
   %9 = load float, float* %fi.1, align 4                 ; <float> [#uses=2]
   %10 = fsub float %9, %8                         ; <float> [#uses=1]
   %11 = fadd float %9, %8                         ; <float> [#uses=1]
   %12 = fsub float 0.000000e+00, %6               ; <float> [#uses=1]
-  %13 = fsub float 0.000000e+00, undef            ; <float> [#uses=2]
-  %14 = fmul float undef, %0                      ; <float> [#uses=1]
-  %15 = fadd float %14, undef                     ; <float> [#uses=2]
+  %13 = fsub float 0.000000e+00, %12
+  %14 = fmul float %0, %0
+  %15 = fadd float %14, %14
   %16 = load float, float* %scevgep81, align 4           ; <float> [#uses=2]
   %17 = fsub float %16, %15                       ; <float> [#uses=1]
   %18 = fadd float %16, %15                       ; <float> [#uses=2]
@@ -68,6 +68,6 @@ bb8:
   br i1 %34, label %bb8, label %bb9
 
 bb9:                                              ; preds = %bb8
-  %35 = fadd float 0.000000e+00, undef            ; <float> [#uses=1]
+  %35 = fadd float 0.000000e+00, %34
   br label %bb7
 }




More information about the llvm-commits mailing list