mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 16:48:02 +00:00
Do not emit bit tests if target does not support natively left shift
llvm-svn: 71240
This commit is contained in:
parent
5461d8e07d
commit
026d2328a6
@ -1923,6 +1923,10 @@ bool SelectionDAGLowering::handleBitTestsSwitchCase(CaseRec& CR,
|
||||
// inserting any additional MBBs necessary to represent the switch.
|
||||
MachineFunction *CurMF = CurMBB->getParent();
|
||||
|
||||
// If target does not have legal shift left, do not emit bit tests at all.
|
||||
if (!TLI.isOperationLegal(ISD::SHL, TLI.getPointerTy()))
|
||||
return false;
|
||||
|
||||
size_t numCmps = 0;
|
||||
for (CaseItr I = CR.Range.first, E = CR.Range.second;
|
||||
I!=E; ++I) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user