1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
4 define float @fneg_constant() {
5 ; CHECK-LABEL: @fneg_constant(
6 ; CHECK-NEXT: ret float 0.000000e+00
12 define float @fneg_undef() {
13 ; CHECK-LABEL: @fneg_undef(
14 ; CHECK-NEXT: ret float undef
20 define <4 x float> @fneg_constant_elts_v4f32() {
21 ; CHECK-LABEL: @fneg_constant_elts_v4f32(
22 ; CHECK-NEXT: ret <4 x float> <float 0.000000e+00, float -0.000000e+00, float 1.000000e+00, float -1.000000e+00>
24 %r = fneg <4 x float> <float -0.0, float 0.0, float -1.0, float 1.0>
28 define <4 x float> @fneg_constant_undef_elts_v4f32() {
29 ; CHECK-LABEL: @fneg_constant_undef_elts_v4f32(
30 ; CHECK-NEXT: ret <4 x float> <float 0.000000e+00, float undef, float undef, float -1.000000e+00>
32 %r = fneg <4 x float> <float -0.0, float undef, float undef, float 1.0>
36 define <4 x float> @fneg_constant_all_undef_elts_v4f32() {
37 ; CHECK-LABEL: @fneg_constant_all_undef_elts_v4f32(
38 ; CHECK-NEXT: ret <4 x float> undef
40 %r = fneg <4 x float> <float undef, float undef, float undef, float undef>