summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf17914)
raw | patch | inline | side by side (parent: cf17914)
author | Tim Northover <tnorthover@apple.com> | |
Wed, 3 Dec 2014 17:49:26 +0000 (17:49 +0000) | ||
committer | Tim Northover <tnorthover@apple.com> | |
Wed, 3 Dec 2014 17:49:26 +0000 (17:49 +0000) |
The blocked arguments code didn't take account of the hacks needed to support
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223247 91177308-0d34-0410-b5e6-96231b3b80d8
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp | patch | blob | history | |
test/CodeGen/AArch64/arm64-aapcs-be.ll | patch | blob | history |
diff --git a/lib/Target/AArch64/AArch64ISelLowering.cpp b/lib/Target/AArch64/AArch64ISelLowering.cpp
index 622b0e1d73ded90346dcda12aa6abba3ac8d76c8..ee31dbff28e5ea52944819dd1d3d9648113b9fcd 100644 (file)
unsigned ArgSize = VA.getValVT().getSizeInBits() / 8;
uint32_t BEAlign = 0;
- if (ArgSize < 8 && !Subtarget->isLittleEndian())
+ if (!Subtarget->isLittleEndian() && ArgSize < 8 &&
+ !Ins[i].Flags.isInConsecutiveRegs())
BEAlign = 8 - ArgSize;
int FI = MFI->CreateFixedObject(ArgSize, ArgOffset + BEAlign, true);
unsigned OpSize = Flags.isByVal() ? Flags.getByValSize() * 8
: VA.getValVT().getSizeInBits();
OpSize = (OpSize + 7) / 8;
- if (!Subtarget->isLittleEndian() && !Flags.isByVal()) {
+ if (!Subtarget->isLittleEndian() && !Flags.isByVal() &&
+ !Flags.isInConsecutiveRegs()) {
if (OpSize < 8)
BEAlign = 8 - OpSize;
}
index 77e2b0f717ba6188b94ff2347d845bbfdc615b2e..f27570acc820ef2f44e95ca2b7cd137d3c458d32 100644 (file)
; CHECK-DAG: strh w{{[0-9]}}, [sp, #14]
; CHECK-DAG: strb w{{[0-9]}}, [sp, #7]
ret i32 %call
-}
\ No newline at end of file
+}
+
+define float @test_block_addr([8 x float], [1 x float] %in) {
+; CHECK-LABEL: test_block_addr:
+; CHECK: ldr s0, [sp]
+ %val = extractvalue [1 x float] %in, 0
+ ret float %val
+}
+
+define void @test_block_addr_callee() {
+; CHECK-LABEL: test_block_addr_callee:
+; CHECK: str {{[a-z0-9]+}}, [sp]
+; CHECK: bl test_block_addr
+ %val = insertvalue [1 x float] undef, float 0.0, 0
+ call float @test_block_addr([8 x float] undef, [1 x float] %val)
+ ret void
+}