summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-02-20 17:41:05 +0000
committerCraig Topper <craig.topper@intel.com>2018-02-20 17:41:05 +0000
commit35801fa5ceb2091efcd969b336806870aa654808 (patch)
tree2283a2759bd8c692d8e0571c0d99b31a8bd27324 /lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
parent010ae8dcbbd8861f4e9f6883218b2e51c3163b9c (diff)
downloadbcm5719-llvm-35801fa5ceb2091efcd969b336806870aa654808.tar.gz
bcm5719-llvm-35801fa5ceb2091efcd969b336806870aa654808.zip
[SelectionDAG] Add LegalTypes flag to getShiftAmountTy. Use it to unify and simplify DAGCombiner and simplifySetCC code and fix a bug.
DAGCombiner and SimplifySetCC both use getPointerTy for shift amounts pre-legalization. DAGCombiner uses a single helper function to hide this. SimplifySetCC does it in multiple places. This patch adds a defaulted parameter to getShiftAmountTy that can make it return getPointerTy for scalar types. Use this parameter to simplify the SimplifySetCC and DAGCombiner. Additionally, there were two places in SimplifySetCC that were creating shifts using the target's preferred shift amount pre-legalization. If the target uses a narrow type and the type is illegal, this can cause SimplfiySetCC to create a shift with an amount that can't represent all possible shift values for the type. To fix this we should use pointer type there too. Alternatively we could make getScalarShiftAmountTy for each target return a safe value for large types as proposed in D43445. And maybe we should still do that, but fixing the SimplifySetCC code keeps other targets from tripping over this in the future. Fixes PR36250. Differential Revision: https://reviews.llvm.org/D43449 llvm-svn: 325602
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud