mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
AArch64: make register block rules apply to vector types too.
The blocking code originated in ARM, which is more aggressive about casting types to a canonical representative before doing anything else, so I missed out most vector HFAs and broke the ABI. This should fix it. llvm-svn: 223126
This commit is contained in:
parent
221c239920
commit
53d419429f
@ -88,11 +88,11 @@ static bool CC_AArch64_Custom_Block(unsigned &ValNo, MVT &ValVT, MVT &LocVT,
|
||||
ArrayRef<uint16_t> RegList;
|
||||
if (LocVT.SimpleTy == MVT::i64)
|
||||
RegList = XRegList;
|
||||
else if (LocVT.SimpleTy == MVT::f32)
|
||||
else if (LocVT.SimpleTy == MVT::f32 || LocVT.is32BitVector())
|
||||
RegList = SRegList;
|
||||
else if (LocVT.SimpleTy == MVT::f64)
|
||||
else if (LocVT.SimpleTy == MVT::f64 || LocVT.is64BitVector())
|
||||
RegList = DRegList;
|
||||
else if (LocVT.SimpleTy == MVT::v2f64)
|
||||
else if (LocVT.SimpleTy == MVT::f128 || LocVT.is128BitVector())
|
||||
RegList = QRegList;
|
||||
else {
|
||||
// Not an array we want to split up after all.
|
||||
|
@ -90,3 +90,101 @@ define i64 @test_smallstruct_block_consume([7 x i64], [2 x i64] %in, i64 %rhs) {
|
||||
%sum = add i64 %lhs, %rhs
|
||||
ret i64 %sum
|
||||
}
|
||||
|
||||
define <1 x i64> @test_v1i64_blocked([7 x double], [2 x <1 x i64>] %in) {
|
||||
; CHECK-LABEL: test_v1i64_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <1 x i64>] %in, 0
|
||||
ret <1 x i64> %val
|
||||
}
|
||||
|
||||
define <1 x double> @test_v1f64_blocked([7 x double], [2 x <1 x double>] %in) {
|
||||
; CHECK-LABEL: test_v1f64_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <1 x double>] %in, 0
|
||||
ret <1 x double> %val
|
||||
}
|
||||
|
||||
define <2 x i32> @test_v2i32_blocked([7 x double], [2 x <2 x i32>] %in) {
|
||||
; CHECK-LABEL: test_v2i32_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <2 x i32>] %in, 0
|
||||
ret <2 x i32> %val
|
||||
}
|
||||
|
||||
define <2 x float> @test_v2f32_blocked([7 x double], [2 x <2 x float>] %in) {
|
||||
; CHECK-LABEL: test_v2f32_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <2 x float>] %in, 0
|
||||
ret <2 x float> %val
|
||||
}
|
||||
|
||||
define <4 x i16> @test_v4i16_blocked([7 x double], [2 x <4 x i16>] %in) {
|
||||
; CHECK-LABEL: test_v4i16_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <4 x i16>] %in, 0
|
||||
ret <4 x i16> %val
|
||||
}
|
||||
|
||||
define <4 x half> @test_v4f16_blocked([7 x double], [2 x <4 x half>] %in) {
|
||||
; CHECK-LABEL: test_v4f16_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <4 x half>] %in, 0
|
||||
ret <4 x half> %val
|
||||
}
|
||||
|
||||
define <8 x i8> @test_v8i8_blocked([7 x double], [2 x <8 x i8>] %in) {
|
||||
; CHECK-LABEL: test_v8i8_blocked:
|
||||
; CHECK: ldr d0, [sp]
|
||||
%val = extractvalue [2 x <8 x i8>] %in, 0
|
||||
ret <8 x i8> %val
|
||||
}
|
||||
|
||||
define <2 x i64> @test_v2i64_blocked([7 x double], [2 x <2 x i64>] %in) {
|
||||
; CHECK-LABEL: test_v2i64_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <2 x i64>] %in, 0
|
||||
ret <2 x i64> %val
|
||||
}
|
||||
|
||||
define <2 x double> @test_v2f64_blocked([7 x double], [2 x <2 x double>] %in) {
|
||||
; CHECK-LABEL: test_v2f64_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <2 x double>] %in, 0
|
||||
ret <2 x double> %val
|
||||
}
|
||||
|
||||
define <4 x i32> @test_v4i32_blocked([7 x double], [2 x <4 x i32>] %in) {
|
||||
; CHECK-LABEL: test_v4i32_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <4 x i32>] %in, 0
|
||||
ret <4 x i32> %val
|
||||
}
|
||||
|
||||
define <4 x float> @test_v4f32_blocked([7 x double], [2 x <4 x float>] %in) {
|
||||
; CHECK-LABEL: test_v4f32_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <4 x float>] %in, 0
|
||||
ret <4 x float> %val
|
||||
}
|
||||
|
||||
define <8 x i16> @test_v8i16_blocked([7 x double], [2 x <8 x i16>] %in) {
|
||||
; CHECK-LABEL: test_v8i16_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <8 x i16>] %in, 0
|
||||
ret <8 x i16> %val
|
||||
}
|
||||
|
||||
define <8 x half> @test_v8f16_blocked([7 x double], [2 x <8 x half>] %in) {
|
||||
; CHECK-LABEL: test_v8f16_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <8 x half>] %in, 0
|
||||
ret <8 x half> %val
|
||||
}
|
||||
|
||||
define <16 x i8> @test_v16i8_blocked([7 x double], [2 x <16 x i8>] %in) {
|
||||
; CHECK-LABEL: test_v16i8_blocked:
|
||||
; CHECK: ldr q0, [sp]
|
||||
%val = extractvalue [2 x <16 x i8>] %in, 0
|
||||
ret <16 x i8> %val
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user