[llvm] r223182 - [PowerPC] Fix readcyclecounter to be custom expanded for all 32-bit targets
Hal Finkel
hfinkel at anl.gov
Tue Dec 2 16:19:18 PST 2014
Author: hfinkel
Date: Tue Dec 2 18:19:17 2014
New Revision: 223182
URL: http://llvm.org/viewvc/llvm-project?rev=223182&view=rev
Log:
[PowerPC] Fix readcyclecounter to be custom expanded for all 32-bit targets
We need to use the custom expansion of readcyclecounter on all 32-bit targets
(even those with 64-bit registers). This should fix the ppc64 buildbot.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/trunk/test/CodeGen/PowerPC/ppc32-cyclecounter.ll
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=223182&r1=223181&r2=223182&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Tue Dec 2 18:19:17 2014
@@ -599,12 +599,10 @@ PPCTargetLowering::PPCTargetLowering(con
}
}
- if (Subtarget.has64BitSupport()) {
+ if (Subtarget.has64BitSupport())
setOperationAction(ISD::PREFETCH, MVT::Other, Legal);
- setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Legal);
- } else {
- setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Custom);
- }
+
+ setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, isPPC64 ? Legal : Custom);
if (!isPPC64) {
setOperationAction(ISD::ATOMIC_LOAD, MVT::i64, Expand);
Modified: llvm/trunk/test/CodeGen/PowerPC/ppc32-cyclecounter.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc32-cyclecounter.ll?rev=223182&r1=223181&r2=223182&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc32-cyclecounter.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc32-cyclecounter.ll Tue Dec 2 18:19:17 2014
@@ -1,6 +1,7 @@
target datalayout = "E-m:e-p:32:32-i64:64-n32"
target triple = "powerpc"
-; RUN: llc < %s | FileCheck %s
+; RUN: llc -mcpu=ppc < %s | FileCheck %s
+; RUN: llc -mcpu=pwr7 < %s | FileCheck %s
define i64 @test1() nounwind {
entry:
More information about the llvm-commits
mailing list