|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 |
| 2 | +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-- -mcpu=pwr7 < %s | FileCheck %s |
| 3 | +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-- -mcpu=pwr8 < %s | FileCheck --check-prefix=PWR8 %s |
| 4 | + |
| 5 | +define <2 x i64> @build_v2i64(ptr nocapture noundef readonly %p, <2 x i64> noundef %a) { |
| 6 | +; CHECK-LABEL: build_v2i64: |
| 7 | +; CHECK: # %bb.0: # %entry |
| 8 | +; CHECK-NEXT: lwz 3, 0(3) |
| 9 | +; CHECK-NEXT: li 4, 0 |
| 10 | +; CHECK-NEXT: std 4, -8(1) |
| 11 | +; CHECK-NEXT: std 3, -16(1) |
| 12 | +; CHECK-NEXT: addi 3, 1, -16 |
| 13 | +; CHECK-NEXT: lxvd2x 34, 0, 3 |
| 14 | +; CHECK-NEXT: blr |
| 15 | +; |
| 16 | +; PWR8-LABEL: build_v2i64: |
| 17 | +; PWR8: # %bb.0: # %entry |
| 18 | +; PWR8-NEXT: lwz 3, 0(3) |
| 19 | +; PWR8-NEXT: li 4, 0 |
| 20 | +; PWR8-NEXT: mtfprd 0, 4 |
| 21 | +; PWR8-NEXT: mtfprd 1, 3 |
| 22 | +; PWR8-NEXT: xxmrghd 34, 1, 0 |
| 23 | +; PWR8-NEXT: blr |
| 24 | +entry: |
| 25 | + %0 = load i32, ptr %p, align 4 |
| 26 | + %conv = zext i32 %0 to i64 |
| 27 | + %vecinit1 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %conv, i64 0 |
| 28 | + ret <2 x i64> %vecinit1 |
| 29 | +} |
| 30 | + |
| 31 | +define <2 x double> @build_v2f64(ptr nocapture noundef readonly %p, <2 x double> noundef %a) { |
| 32 | +; CHECK-LABEL: build_v2f64: |
| 33 | +; CHECK: # %bb.0: # %entry |
| 34 | +; CHECK-NEXT: lfs 0, 0(3) |
| 35 | +; CHECK-NEXT: xxlxor 1, 1, 1 |
| 36 | +; CHECK-NEXT: xxmrghd 34, 0, 1 |
| 37 | +; CHECK-NEXT: blr |
| 38 | +; |
| 39 | +; PWR8-LABEL: build_v2f64: |
| 40 | +; PWR8: # %bb.0: # %entry |
| 41 | +; PWR8-NEXT: lfs 0, 0(3) |
| 42 | +; PWR8-NEXT: xxlxor 1, 1, 1 |
| 43 | +; PWR8-NEXT: xxmrghd 34, 0, 1 |
| 44 | +; PWR8-NEXT: blr |
| 45 | +entry: |
| 46 | + %0 = load float, ptr %p, align 4 |
| 47 | + %conv = fpext float %0 to double |
| 48 | + %vecinit1 = insertelement <2 x double> <double poison, double 0.000000e+00>, double %conv, i64 0 |
| 49 | + ret <2 x double> %vecinit1 |
| 50 | +} |
0 commit comments