mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
7c9c6ed761
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
208 lines
6.3 KiB
LLVM
208 lines
6.3 KiB
LLVM
; RUN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
|
|
|
|
define <2 x double> @test00(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 0, i32 0>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: test00
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 3
|
|
}
|
|
|
|
define <2 x double> @test01(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 0, i32 1>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: test01
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: xxpermdi 34, 0, 0, 2
|
|
}
|
|
|
|
define <2 x double> @test02(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 0, i32 2>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test02
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 1, 0, 3
|
|
}
|
|
|
|
define <2 x double> @test03(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 0, i32 3>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test03
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 1, 0, 1
|
|
}
|
|
|
|
define <2 x double> @test10(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 1, i32 0>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test10
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 2
|
|
}
|
|
|
|
define <2 x double> @test11(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 1, i32 1>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test11
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 0
|
|
}
|
|
|
|
define <2 x double> @test12(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 1, i32 2>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test12
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 1, 0, 2
|
|
}
|
|
|
|
define <2 x double> @test13(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 1, i32 3>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test13
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 1, 0, 0
|
|
}
|
|
|
|
define <2 x double> @test20(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 2, i32 0>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test20
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 0, 1, 3
|
|
}
|
|
|
|
define <2 x double> @test21(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 2, i32 1>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test21
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 0, 1, 1
|
|
}
|
|
|
|
define <2 x double> @test22(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 2, i32 2>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test22
|
|
; CHECK: lxvd2x 0, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 3
|
|
}
|
|
|
|
define <2 x double> @test23(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 2, i32 3>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test23
|
|
; CHECK: lxvd2x 0, 0, 4
|
|
; CHECK: xxpermdi 34, 0, 0, 2
|
|
}
|
|
|
|
define <2 x double> @test30(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 3, i32 0>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test30
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 0, 1, 2
|
|
}
|
|
|
|
define <2 x double> @test31(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 3, i32 1>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test31
|
|
; CHECK: lxvd2x 0, 0, 3
|
|
; CHECK: lxvd2x 1, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 1, 1, 1, 2
|
|
; CHECK: xxpermdi 34, 0, 1, 0
|
|
}
|
|
|
|
define <2 x double> @test32(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 3, i32 2>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test32
|
|
; CHECK: lxvd2x 0, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 2
|
|
}
|
|
|
|
define <2 x double> @test33(<2 x double>* %p1, <2 x double>* %p2) {
|
|
%v1 = load <2 x double>, <2 x double>* %p1
|
|
%v2 = load <2 x double>, <2 x double>* %p2
|
|
%v3 = shufflevector <2 x double> %v1, <2 x double> %v2, <2 x i32> < i32 3, i32 3>
|
|
ret <2 x double> %v3
|
|
|
|
; CHECK-LABEL: @test33
|
|
; CHECK: lxvd2x 0, 0, 4
|
|
; CHECK: xxpermdi 0, 0, 0, 2
|
|
; CHECK: xxpermdi 34, 0, 0, 0
|
|
}
|