60 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=aarch64-apple-darwin | FileCheck %s3 4; Check that the legalizer doesn't crash when scalarizing FP instructions'5; operands or results. In each test either the result or the operand are6; illegal on AArch64, though not both.7 8define <1 x double> @test_sitofp(<1 x i1> %in) #0 {9; CHECK-LABEL: test_sitofp:10; CHECK: ; %bb.0: ; %entry11; CHECK-NEXT: sbfx w8, w0, #0, #112; CHECK-NEXT: scvtf d0, w813; CHECK-NEXT: ret14entry:15 %0 = call <1 x double> @llvm.experimental.constrained.sitofp.v1f64.v1i1(<1 x i1> %in, metadata !"round.dynamic", metadata !"fpexcept.strict") #016 ret <1 x double> %017}18 19define <1 x double> @test_uitofp(<1 x i1> %in) #0 {20; CHECK-LABEL: test_uitofp:21; CHECK: ; %bb.0: ; %entry22; CHECK-NEXT: and w8, w0, #0x123; CHECK-NEXT: ucvtf d0, w824; CHECK-NEXT: ret25entry:26 %0 = call <1 x double> @llvm.experimental.constrained.uitofp.v1f64.v1i1(<1 x i1> %in, metadata !"round.dynamic", metadata !"fpexcept.strict") #027 ret <1 x double> %028}29 30define <1 x i1> @test_fcmp(<1 x double> %x, <1 x double> %y) #0 {31; CHECK-LABEL: test_fcmp:32; CHECK: ; %bb.0: ; %entry33; CHECK-NEXT: fcmp d0, d134; CHECK-NEXT: cset w8, eq35; CHECK-NEXT: csinc w0, w8, wzr, vc36; CHECK-NEXT: ret37entry:38 %conv = tail call <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double> %x, <1 x double> %y, metadata !"ueq", metadata !"fpexcept.strict")39 ret <1 x i1> %conv40}41 42define <1 x i1> @test_fcmps(<1 x double> %x, <1 x double> %y) #0 {43; CHECK-LABEL: test_fcmps:44; CHECK: ; %bb.0: ; %entry45; CHECK-NEXT: fcmpe d0, d146; CHECK-NEXT: cset w8, eq47; CHECK-NEXT: csinc w0, w8, wzr, vc48; CHECK-NEXT: ret49entry:50 %conv = tail call <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double> %x, <1 x double> %y, metadata !"ueq", metadata !"fpexcept.strict")51 ret <1 x i1> %conv52}53 54attributes #0 = { strictfp }55 56declare <1 x double> @llvm.experimental.constrained.sitofp.v1f64.v1i1(<1 x i1>, metadata, metadata)57declare <1 x double> @llvm.experimental.constrained.uitofp.v1f64.v1i1(<1 x i1>, metadata, metadata)58declare <1 x i1> @llvm.experimental.constrained.fcmp.v1f64(<1 x double>, <1 x double>, metadata, metadata) #059declare <1 x i1> @llvm.experimental.constrained.fcmps.v1f64(<1 x double>, <1 x double>, metadata, metadata) #060