64 lines · plain
1; RUN: opt -mtriple=aarch64-linux-gnu -mattr=+sve -passes="print<cost-model>" 2>&1 -disable-output < %s | FileCheck %s2 3; Integer to float bitcasts4 5target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"6 7define <vscale x 2 x double> @test_nxv2f64(<vscale x 2 x i64> %a) {8; CHECK-LABEL: test_nxv2f649; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x i64> %a to <vscale x 2 x double>10 %b = bitcast <vscale x 2 x i64> %a to <vscale x 2 x double>11 ret <vscale x 2 x double> %b12}13 14define <vscale x 2 x half> @test_nxv2f16(<vscale x 2 x i16> %a) {15; CHECK-LABEL: test_nxv2f1616; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x i16> %a to <vscale x 2 x half>17 %b = bitcast <vscale x 2 x i16> %a to <vscale x 2 x half>18 ret <vscale x 2 x half> %b19}20 21define <vscale x 4 x half> @test_nxv4f16(<vscale x 4 x i16> %a) {22; CHECK-LABEL: test_nxv4f1623; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 4 x i16> %a to <vscale x 4 x half>24 %b = bitcast <vscale x 4 x i16> %a to <vscale x 4 x half>25 ret <vscale x 4 x half> %b26}27 28define <vscale x 2 x float> @test_nxv2f32(<vscale x 2 x i32> %a) {29; CHECK-LABEL: test_nxv2f3230; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x i32> %a to <vscale x 2 x float>31 %b = bitcast <vscale x 2 x i32> %a to <vscale x 2 x float>32 ret <vscale x 2 x float> %b33}34 35; Float to integer bitcasts36 37define <vscale x 2 x i64> @test_nxv2i64(<vscale x 2 x double> %a) {38; CHECK-LABEL: test_nxv2i6439; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x double> %a to <vscale x 2 x i64>40 %b = bitcast <vscale x 2 x double> %a to <vscale x 2 x i64>41 ret <vscale x 2 x i64> %b42}43 44define <vscale x 2 x i16> @test_nxv2i16(<vscale x 2 x half> %a) {45; CHECK-LABEL: test_nxv2i1646; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x half> %a to <vscale x 2 x i16>47 %b = bitcast <vscale x 2 x half> %a to <vscale x 2 x i16>48 ret <vscale x 2 x i16> %b49}50 51define <vscale x 4 x i16> @test_nxv4i16(<vscale x 4 x half> %a) {52; CHECK-LABEL: test_nxv4i1653; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 4 x half> %a to <vscale x 4 x i16>54 %b = bitcast <vscale x 4 x half> %a to <vscale x 4 x i16>55 ret <vscale x 4 x i16> %b56}57 58define <vscale x 2 x i32> @test_nxv2i32(<vscale x 2 x float> %a) {59; CHECK-LABEL: test_nxv2i3260; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast <vscale x 2 x float> %a to <vscale x 2 x i32>61 %b = bitcast <vscale x 2 x float> %a to <vscale x 2 x i32>62 ret <vscale x 2 x i32> %b63}64