[llvm] r209990 - ARMEB: Fix function return type f64
Christian Pirker
cpirker at a-bix.com
Sun Jun 1 02:30:53 PDT 2014
Author: cpirker
Date: Sun Jun 1 04:30:52 2014
New Revision: 209990
URL: http://llvm.org/viewvc/llvm-project?rev=209990&view=rev
Log:
ARMEB: Fix function return type f64
Reviewed at http://reviews.llvm.org/D3968
Added:
llvm/trunk/test/CodeGen/ARM/big-endian-ret-f64.ll
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=209990&r1=209989&r2=209990&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Sun Jun 1 04:30:52 2014
@@ -8315,6 +8315,8 @@ static SDValue PerformVMOVRRDCombine(SDN
std::min(4U, LD->getAlignment() / 2));
DAG.ReplaceAllUsesOfValueWith(SDValue(LD, 1), NewLD2.getValue(1));
+ if (DCI.DAG.getTargetLoweringInfo().isBigEndian())
+ std::swap (NewLD1, NewLD2);
SDValue Result = DCI.CombineTo(N, NewLD1, NewLD2);
DCI.RemoveFromWorklist(LD);
DAG.DeleteNode(LD);
Added: llvm/trunk/test/CodeGen/ARM/big-endian-ret-f64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/big-endian-ret-f64.ll?rev=209990&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/big-endian-ret-f64.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/big-endian-ret-f64.ll Sun Jun 1 04:30:52 2014
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=armebv7a-eabi %s -O0 -o - | FileCheck %s
+; RUN: llc -mtriple=armebv8a-eabi %s -O0 -o - | FileCheck %s
+
+define double @fn() {
+; CHECK-LABEL: fn
+; CHECK: ldr r0, [sp]
+; CHECK: ldr r1, [sp, #4]
+ %r = alloca double, align 8
+ %1 = load double* %r, align 8
+ ret double %1
+}
+
More information about the llvm-commits
mailing list