summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09d2a61)
raw | patch | inline | side by side (parent: 09d2a61)
author | Hal Finkel <hfinkel@anl.gov> | |
Wed, 3 Dec 2014 00:19:17 +0000 (00:19 +0000) | ||
committer | Hal Finkel <hfinkel@anl.gov> | |
Wed, 3 Dec 2014 00:19:17 +0000 (00:19 +0000) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223182 91177308-0d34-0410-b5e6-96231b3b80d8
(even those with 64-bit registers). This should fix the ppc64 buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223182 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp | patch | blob | history | |
test/CodeGen/PowerPC/ppc32-cyclecounter.ll | patch | blob | history |
index 3668a87b0ec001a071c64c6ccdfd277bf271d84c..d913f3bbf7cb5514b4ad71d54f728f47e56bee52 100644 (file)
}
}
- 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);
diff --git a/test/CodeGen/PowerPC/ppc32-cyclecounter.ll b/test/CodeGen/PowerPC/ppc32-cyclecounter.ll
index 75d24c3834842376c9caf13588d422ef7c01f051..9e2cd0b12880cc01f6a74a2abf38e211c81a1b5c 100644 (file)
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: