diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-08-28 01:49:59 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-08-28 01:49:59 +0000 |
commit | f9c19da03a2f56da38a05ad6c126da49c1fafd58 (patch) | |
tree | 67903c4a8f76c8f91cdd9b7099df264c136714ac /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | ec18285b91db7794e278eaab7d854c703db07eb5 (diff) | |
download | bcm5719-llvm-f9c19da03a2f56da38a05ad6c126da49c1fafd58.tar.gz bcm5719-llvm-f9c19da03a2f56da38a05ad6c126da49c1fafd58.zip |
[CodeGen] Support (and default to) expanding READCYCLECOUNTER to 0.
For targets that didn't support this, this will let us respect the
langref instead of failing to select.
Note that we don't need to change the 32-bit x86/PPC lowerings (to
account for the result type/# difference) because they're both
custom and bypass type legalization.
llvm-svn: 246258
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index e7fdd8f9518..d7a58f9686d 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -845,6 +845,9 @@ void TargetLoweringBase::initActions() { // Most targets ignore the @llvm.prefetch intrinsic. setOperationAction(ISD::PREFETCH, MVT::Other, Expand); + // Most targets also ignore the @llvm.readcyclecounter intrinsic. + setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, Expand); + // ConstantFP nodes default to expand. Targets can either change this to // Legal, in which case all fp constants are legal, or use isFPImmLegal() // to optimize expansions for certain constants. |