| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| ; RUN: llc -mtriple=aarch64 -mattr=+sve < %s | FileCheck %s |
| |
| define <vscale x 4 x i1> @test_splat_const_is_pos_normal() { |
| ; CHECK-LABEL: test_splat_const_is_pos_normal: |
| ; CHECK: // %bb.0: |
| ; CHECK-NEXT: fmov z0.s, #1.00000000 |
| ; CHECK-NEXT: mov z1.s, #0x7fffff |
| ; CHECK-NEXT: ptrue p0.s |
| ; CHECK-NEXT: sub z0.s, z0.s, #1 // =0x1 |
| ; CHECK-NEXT: cmphi p0.s, p0/z, z1.s, z0.s |
| ; CHECK-NEXT: ret |
| %res = call <vscale x 4 x i1> @llvm.is.fpclass.nxv4f32(<vscale x 4 x float> splat (float 1.0), i32 128) |
| ret <vscale x 4 x i1> %res |
| } |
| |
| define <vscale x 4 x i1> @test_splat_const_isnan() { |
| ; CHECK-LABEL: test_splat_const_isnan: |
| ; CHECK: // %bb.0: |
| ; CHECK-NEXT: pfalse p0.b |
| ; CHECK-NEXT: ret |
| %res = call <vscale x 4 x i1> @llvm.is.fpclass.nxv4f32(<vscale x 4 x float> splat (float 2.0), i32 3) |
| ret <vscale x 4 x i1> %res |
| } |