From 538055ab89454b66b4cf65978a71d1f0d9312aa7 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 12 Mar 2018 15:47:32 +0000 Subject: [PATCH] [InstSimplify] add test for m_NegZero with undef elt; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327287 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstSimplify/floating-point-arithmetic.ll | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/Transforms/InstSimplify/floating-point-arithmetic.ll b/test/Transforms/InstSimplify/floating-point-arithmetic.ll index 7e19c9bf781..fc364937fe9 100644 --- a/test/Transforms/InstSimplify/floating-point-arithmetic.ll +++ b/test/Transforms/InstSimplify/floating-point-arithmetic.ll @@ -1,6 +1,15 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -instsimplify -S | FileCheck %s +define <2 x float> @fsub_negzero_vec_undef_elts(<2 x float> %x) { +; CHECK-LABEL: @fsub_negzero_vec_undef_elts( +; CHECK-NEXT: [[R:%.*]] = fsub nsz <2 x float> [[X:%.*]], +; CHECK-NEXT: ret <2 x float> [[R]] +; + %r = fsub nsz <2 x float> %x, + ret <2 x float> %r +} + ; fsub -0.0, (fsub -0.0, X) ==> X define float @fsub_-0_-0_x(float %a) { ; CHECK-LABEL: @fsub_-0_-0_x( -- 2.11.0