Skip to content

Commit

Permalink
[PowerPC] Pre-commit test for D107428. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzEq committed Aug 6, 2021
1 parent 28939b6 commit 43018f0
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions llvm/test/CodeGen/PowerPC/vec_int_to_double_shuffle.ll
@@ -0,0 +1,39 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown \
; RUN: -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-LE %s
; RUN: llc -mcpu=pwr8 -mtriple=powerpc64-unknown-unknown \
; RUN: -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-BE %s

define <2 x double> @foo(<4 x i32> %s) {
; CHECK-LE-LABEL: foo:
; CHECK-LE: # %bb.0: # %entry
; CHECK-LE-NEXT: xvcvsxwdp 34, 34
; CHECK-LE-NEXT: blr
;
; CHECK-BE-LABEL: foo:
; CHECK-BE: # %bb.0: # %entry
; CHECK-BE-NEXT: xxsldwi 0, 34, 34, 3
; CHECK-BE-NEXT: xvcvsxwdp 34, 0
; CHECK-BE-NEXT: blr
entry:
%0 = shufflevector <4 x i32> %s, <4 x i32> undef, <2 x i32> <i32 1, i32 3>
%1 = sitofp <2 x i32> %0 to <2 x double>
ret <2 x double> %1
}

define <2 x double> @bar(<4 x i32> %s) {
; CHECK-LE-LABEL: bar:
; CHECK-LE: # %bb.0: # %entry
; CHECK-LE-NEXT: xvcvuxwdp 34, 34
; CHECK-LE-NEXT: blr
;
; CHECK-BE-LABEL: bar:
; CHECK-BE: # %bb.0: # %entry
; CHECK-BE-NEXT: xxsldwi 0, 34, 34, 3
; CHECK-BE-NEXT: xvcvuxwdp 34, 0
; CHECK-BE-NEXT: blr
entry:
%0 = shufflevector <4 x i32> %s, <4 x i32> undef, <2 x i32> <i32 1, i32 3>
%1 = uitofp <2 x i32> %0 to <2 x double>
ret <2 x double> %1
}

0 comments on commit 43018f0

Please sign in to comment.