[llvm] r327553 - [InstSimplify] regenerate checks; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 11:49:57 PDT 2018
Author: spatel
Date: Wed Mar 14 11:49:57 2018
New Revision: 327553
URL: http://llvm.org/viewvc/llvm-project?rev=327553&view=rev
Log:
[InstSimplify] regenerate checks; NFC
Modified:
llvm/trunk/test/Transforms/InstSimplify/fast-math.ll
Modified: llvm/trunk/test/Transforms/InstSimplify/fast-math.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/fast-math.ll?rev=327553&r1=327552&r2=327553&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/fast-math.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/fast-math.ll Wed Mar 14 11:49:57 2018
@@ -1,10 +1,10 @@
-; NOTE: Assertions have been autogenerated by update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instsimplify -S | FileCheck %s
;; x * 0 ==> 0 when no-nans and no-signed-zero
define float @mul_zero_1(float %a) {
; CHECK-LABEL: @mul_zero_1(
-; CHECK: ret float 0.000000e+00
+; CHECK-NEXT: ret float 0.000000e+00
;
%b = fmul nsz nnan float %a, 0.0
ret float %b
@@ -12,7 +12,7 @@ define float @mul_zero_1(float %a) {
define float @mul_zero_2(float %a) {
; CHECK-LABEL: @mul_zero_2(
-; CHECK: ret float 0.000000e+00
+; CHECK-NEXT: ret float 0.000000e+00
;
%b = fmul fast float 0.0, %a
ret float %b
@@ -21,7 +21,7 @@ define float @mul_zero_2(float %a) {
;; x * 0 =/=> 0 when there could be nans or -0
define float @no_mul_zero_1(float %a) {
; CHECK-LABEL: @no_mul_zero_1(
-; CHECK: [[B:%.*]] = fmul nsz float %a, 0.000000e+00
+; CHECK-NEXT: [[B:%.*]] = fmul nsz float [[A:%.*]], 0.000000e+00
; CHECK-NEXT: ret float [[B]]
;
%b = fmul nsz float %a, 0.0
@@ -30,7 +30,7 @@ define float @no_mul_zero_1(float %a) {
define float @no_mul_zero_2(float %a) {
; CHECK-LABEL: @no_mul_zero_2(
-; CHECK: [[B:%.*]] = fmul nnan float %a, 0.000000e+00
+; CHECK-NEXT: [[B:%.*]] = fmul nnan float [[A:%.*]], 0.000000e+00
; CHECK-NEXT: ret float [[B]]
;
%b = fmul nnan float %a, 0.0
@@ -39,7 +39,7 @@ define float @no_mul_zero_2(float %a) {
define float @no_mul_zero_3(float %a) {
; CHECK-LABEL: @no_mul_zero_3(
-; CHECK: [[B:%.*]] = fmul float %a, 0.000000e+00
+; CHECK-NEXT: [[B:%.*]] = fmul float [[A:%.*]], 0.000000e+00
; CHECK-NEXT: ret float [[B]]
;
%b = fmul float %a, 0.0
@@ -51,8 +51,8 @@ define float @no_mul_zero_3(float %a) {
; expression
define float @fadd_fsub_0(float %a) {
; CHECK-LABEL: @fadd_fsub_0(
-; CHECK: [[NOFOLD:%.*]] = fsub float 0.000000e+00, %a
-; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd nnan float [[NOFOLD]], %a
+; CHECK-NEXT: [[NOFOLD:%.*]] = fsub float 0.000000e+00, [[A:%.*]]
+; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd nnan float [[NOFOLD]], [[A]]
; CHECK-NEXT: ret float [[NO_ZERO]]
;
; X + -X ==> 0
@@ -86,9 +86,9 @@ define float @fadd_fsub_0(float %a) {
; fsub nnan x, x ==> 0.0
define float @fsub_x_x(float %a) {
; CHECK-LABEL: @fsub_x_x(
-; CHECK: [[NO_ZERO1:%.*]] = fsub ninf float %a, %a
-; CHECK-NEXT: [[NO_ZERO2:%.*]] = fsub float %a, %a
-; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd float [[NO_ZERO1:%.*]], [[NO_ZERO2:%.*]]
+; CHECK-NEXT: [[NO_ZERO1:%.*]] = fsub ninf float [[A:%.*]], [[A]]
+; CHECK-NEXT: [[NO_ZERO2:%.*]] = fsub float [[A]], [[A]]
+; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd float [[NO_ZERO1]], [[NO_ZERO2]]
; CHECK-NEXT: ret float [[NO_ZERO]]
;
; X - X ==> 0
@@ -108,7 +108,7 @@ define float @fsub_x_x(float %a) {
; fsub nsz 0.0, (fsub 0.0, X) ==> X
define float @fsub_0_0_x(float %a) {
; CHECK-LABEL: @fsub_0_0_x(
-; CHECK: ret float %a
+; CHECK-NEXT: ret float [[A:%.*]]
;
%t1 = fsub float 0.0, %a
%ret = fsub nsz float 0.0, %t1
@@ -118,9 +118,9 @@ define float @fsub_0_0_x(float %a) {
; fadd nsz X, 0 ==> X
define float @nofold_fadd_x_0(float %a) {
; CHECK-LABEL: @nofold_fadd_x_0(
-; CHECK: [[NO_ZERO1:%.*]] = fadd ninf float %a, 0.000000e+00
-; CHECK-NEXT: [[NO_ZERO2:%.*]] = fadd nnan float %a, 0.000000e+00
-; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd float [[NO_ZERO1:%.*]], [[NO_ZERO2:%.*]]
+; CHECK-NEXT: [[NO_ZERO1:%.*]] = fadd ninf float [[A:%.*]], 0.000000e+00
+; CHECK-NEXT: [[NO_ZERO2:%.*]] = fadd nnan float [[A]], 0.000000e+00
+; CHECK-NEXT: [[NO_ZERO:%.*]] = fadd float [[NO_ZERO1]], [[NO_ZERO2]]
; CHECK-NEXT: ret float [[NO_ZERO]]
;
; Dont fold
@@ -133,7 +133,7 @@ define float @nofold_fadd_x_0(float %a)
; fdiv nsz nnan 0, X ==> 0
define double @fdiv_zero_by_x(double %X) {
; CHECK-LABEL: @fdiv_zero_by_x(
-; CHECK: ret double 0.000000e+00
+; CHECK-NEXT: ret double 0.000000e+00
;
; 0 / X -> 0
%r = fdiv nnan nsz double 0.0, %X
@@ -142,7 +142,7 @@ define double @fdiv_zero_by_x(double %X)
define float @fdiv_self(float %f) {
; CHECK-LABEL: @fdiv_self(
-; CHECK: ret float 1.000000e+00
+; CHECK-NEXT: ret float 1.000000e+00
;
%div = fdiv nnan float %f, %f
ret float %div
@@ -150,7 +150,7 @@ define float @fdiv_self(float %f) {
define float @fdiv_self_invalid(float %f) {
; CHECK-LABEL: @fdiv_self_invalid(
-; CHECK: [[DIV:%.*]] = fdiv float %f, %f
+; CHECK-NEXT: [[DIV:%.*]] = fdiv float [[F:%.*]], [[F]]
; CHECK-NEXT: ret float [[DIV]]
;
%div = fdiv float %f, %f
@@ -159,7 +159,7 @@ define float @fdiv_self_invalid(float %f
define float @fdiv_neg1(float %f) {
; CHECK-LABEL: @fdiv_neg1(
-; CHECK: ret float -1.000000e+00
+; CHECK-NEXT: ret float -1.000000e+00
;
%neg = fsub fast float -0.000000e+00, %f
%div = fdiv nnan float %neg, %f
@@ -168,7 +168,7 @@ define float @fdiv_neg1(float %f) {
define float @fdiv_neg2(float %f) {
; CHECK-LABEL: @fdiv_neg2(
-; CHECK: ret float -1.000000e+00
+; CHECK-NEXT: ret float -1.000000e+00
;
%neg = fsub fast float 0.000000e+00, %f
%div = fdiv nnan float %neg, %f
@@ -177,8 +177,8 @@ define float @fdiv_neg2(float %f) {
define float @fdiv_neg_invalid(float %f) {
; CHECK-LABEL: @fdiv_neg_invalid(
-; CHECK: [[NEG:%.*]] = fsub fast float -0.000000e+00, %f
-; CHECK-NEXT: [[DIV:%.*]] = fdiv float [[NEG]], %f
+; CHECK-NEXT: [[NEG:%.*]] = fsub fast float -0.000000e+00, [[F:%.*]]
+; CHECK-NEXT: [[DIV:%.*]] = fdiv float [[NEG]], [[F]]
; CHECK-NEXT: ret float [[DIV]]
;
%neg = fsub fast float -0.000000e+00, %f
@@ -188,7 +188,7 @@ define float @fdiv_neg_invalid(float %f)
define float @fdiv_neg_swapped1(float %f) {
; CHECK-LABEL: @fdiv_neg_swapped1(
-; CHECK: ret float -1.000000e+00
+; CHECK-NEXT: ret float -1.000000e+00
;
%neg = fsub float -0.000000e+00, %f
%div = fdiv nnan float %f, %neg
@@ -197,7 +197,7 @@ define float @fdiv_neg_swapped1(float %f
define float @fdiv_neg_swapped2(float %f) {
; CHECK-LABEL: @fdiv_neg_swapped2(
-; CHECK: ret float -1.000000e+00
+; CHECK-NEXT: ret float -1.000000e+00
;
%neg = fsub float 0.000000e+00, %f
%div = fdiv nnan float %f, %neg
More information about the llvm-commits
mailing list