blob: f860c376036bea2a30fead6c3b27395ff3d35c6d [file] [log] [blame]
Sanjay Patel594c1542018-03-28 00:49:12 +00001; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown -verify-machineinstrs < %s | FileCheck %s
3
Sanjay Pateld052de82018-06-27 18:16:40 +00004define <4 x float> @truncf32(<4 x float> %a) #0 {
Sanjay Patel594c1542018-03-28 00:49:12 +00005; CHECK-LABEL: truncf32:
6; CHECK: # %bb.0:
Sanjay Patel3d453ad2018-04-20 15:07:55 +00007; CHECK-NEXT: xvrspiz 34, 34
Sanjay Patel594c1542018-03-28 00:49:12 +00008; CHECK-NEXT: blr
9 %t0 = fptosi <4 x float> %a to <4 x i32>
10 %t1 = sitofp <4 x i32> %t0 to <4 x float>
11 ret <4 x float> %t1
12}
13
Sanjay Pateld052de82018-06-27 18:16:40 +000014define <2 x double> @truncf64(<2 x double> %a) #0 {
Sanjay Patel594c1542018-03-28 00:49:12 +000015; CHECK-LABEL: truncf64:
16; CHECK: # %bb.0:
Sanjay Patel3d453ad2018-04-20 15:07:55 +000017; CHECK-NEXT: xvrdpiz 34, 34
Sanjay Patel594c1542018-03-28 00:49:12 +000018; CHECK-NEXT: blr
19 %t0 = fptosi <2 x double> %a to <2 x i64>
20 %t1 = sitofp <2 x i64> %t0 to <2 x double>
21 ret <2 x double> %t1
22}
23
Sanjay Pateld052de82018-06-27 18:16:40 +000024define <4 x float> @truncf32u(<4 x float> %a) #0 {
Sanjay Patel594c1542018-03-28 00:49:12 +000025; CHECK-LABEL: truncf32u:
26; CHECK: # %bb.0:
Sanjay Patel3d453ad2018-04-20 15:07:55 +000027; CHECK-NEXT: xvrspiz 34, 34
Sanjay Patel594c1542018-03-28 00:49:12 +000028; CHECK-NEXT: blr
29 %t0 = fptoui <4 x float> %a to <4 x i32>
30 %t1 = uitofp <4 x i32> %t0 to <4 x float>
31 ret <4 x float> %t1
32}
33
Sanjay Pateld052de82018-06-27 18:16:40 +000034define <2 x double> @truncf64u(<2 x double> %a) #0 {
Sanjay Patel594c1542018-03-28 00:49:12 +000035; CHECK-LABEL: truncf64u:
36; CHECK: # %bb.0:
Sanjay Patel3d453ad2018-04-20 15:07:55 +000037; CHECK-NEXT: xvrdpiz 34, 34
Sanjay Patel594c1542018-03-28 00:49:12 +000038; CHECK-NEXT: blr
39 %t0 = fptoui <2 x double> %a to <2 x i64>
40 %t1 = uitofp <2 x i64> %t0 to <2 x double>
41 ret <2 x double> %t1
42}
43
Sanjay Pateld052de82018-06-27 18:16:40 +000044attributes #0 = { "no-signed-zeros-fp-math"="true" }
45