brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 56e0b4a Raw
45 lines · plain
1; RUN: llc < %s -mtriple=arm64-apple-darwin | FileCheck %s2 3; PR207784; Check that the legalizer doesn't crash when scalarizing FP conversion5; instructions' operands.  The operands are all illegal on AArch64,6; ensuring they are legalized.  The results are all legal.7 8define <1 x double> @test_sitofp(<1 x i1> %in) {9; CHECK-LABEL: test_sitofp:10; CHECK:       sbfx  [[GPR:w[0-9]+]], w0, #0, #111; CHECK-NEXT:  scvtf d0, [[GPR]]12; CHECK-NEXT:  ret13entry:14  %0 = sitofp <1 x i1> %in to <1 x double>15  ret <1 x double> %016}17 18define <1 x double> @test_uitofp(<1 x i1> %in) {19; CHECK-LABEL: test_uitofp:20; CHECK:       and   [[GPR:w[0-9]+]], w0, #0x121; CHECK-NEXT:  ucvtf d0, [[GPR]]22; CHECK-NEXT:  ret23entry:24  %0 = uitofp <1 x i1> %in to <1 x double>25  ret <1 x double> %026}27 28define <1 x i64> @test_fptosi(<1 x fp128> %in) {29; CHECK-LABEL: test_fptosi:30; CHECK:       bl    ___fixtfdi31; CHECK-NEXT:  fmov  d0, x032entry:33  %0 = fptosi <1 x fp128> %in to <1 x i64>34  ret <1 x i64> %035}36 37define <1 x i64> @test_fptoui(<1 x fp128> %in) {38; CHECK-LABEL: test_fptoui:39; CHECK:       bl    ___fixunstfdi40; CHECK-NEXT:  fmov  d0, x041entry:42  %0 = fptoui <1 x fp128> %in to <1 x i64>43  ret <1 x i64> %044}45