diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-06 01:02:44 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-06 01:02:44 +0000 |
commit | ac730dd2d1d858a01e76042b52428851f11a3e13 (patch) | |
tree | d42c1e01ccc6a0f4d85e9b24e6b398b096ea3d72 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 3b949bcaf345d15cb451f54b19bc4c60cf625a3d (diff) | |
download | bcm5719-llvm-ac730dd2d1d858a01e76042b52428851f11a3e13.tar.gz bcm5719-llvm-ac730dd2d1d858a01e76042b52428851f11a3e13.zip |
Avoid zero extend bit test operands to pointer type if all the masks fit in
the original type of the switch statement key.
rdar://8781238
llvm-svn: 122935
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index a37032ffb74..4cc276101cb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1017,12 +1017,14 @@ SelectionDAGISel::FinishBasicBlock() { FuncInfo->InsertPt = FuncInfo->MBB->end(); // Emit the code if (j+1 != ej) - SDB->visitBitTestCase(SDB->BitTestCases[i].Cases[j+1].ThisBB, + SDB->visitBitTestCase(SDB->BitTestCases[i], + SDB->BitTestCases[i].Cases[j+1].ThisBB, SDB->BitTestCases[i].Reg, SDB->BitTestCases[i].Cases[j], FuncInfo->MBB); else - SDB->visitBitTestCase(SDB->BitTestCases[i].Default, + SDB->visitBitTestCase(SDB->BitTestCases[i], + SDB->BitTestCases[i].Default, SDB->BitTestCases[i].Reg, SDB->BitTestCases[i].Cases[j], FuncInfo->MBB); |