diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-04-28 03:34:31 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-04-28 03:34:31 +0000 |
commit | 33772c53754bd27af1ce41379def536fc1de7fb0 (patch) | |
tree | 90695f7cd1b8952186dd169e15cea30e312247a8 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 7626f778a567767690b279420037b7f11f2e4748 (diff) | |
download | bcm5719-llvm-33772c53754bd27af1ce41379def536fc1de7fb0.tar.gz bcm5719-llvm-33772c53754bd27af1ce41379def536fc1de7fb0.zip |
[CodeGen] Default CTTZ_ZERO_UNDEF/CTLZ_ZERO_UNDEF to Expand in TargetLoweringBase. This is what the majority of the targets want and removes a bunch of code. Set it to Legal explicitly in the few cases where that's the desired behavior.
llvm-svn: 267853
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 0355b8dd135..433e4b7d205 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -881,6 +881,10 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::SMULO, VT, Expand); setOperationAction(ISD::UMULO, VT, Expand); + // These default to Expand so they will be expanded to CTLZ/CTTZ by default. + setOperationAction(ISD::CTLZ_ZERO_UNDEF, VT, Expand); + setOperationAction(ISD::CTTZ_ZERO_UNDEF, VT, Expand); + setOperationAction(ISD::BITREVERSE, VT, Expand); // These library functions default to expand. |