Skip to content

Commit 33112cb

Browse files
committed
[DAGCombiner] Remove unnecessary assert from getShiftAmountTy wrapper. NFC
The same assert appears in the TargetLowering function. Refine comment to describe as a convenience wrapper and leave it to TargetLowering documentation to explain.
1 parent f737865 commit 33112cb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,8 @@ namespace {
843843

844844
SelectionDAG &getDAG() const { return DAG; }
845845

846-
/// Returns a type large enough to hold any valid shift amount - before type
847-
/// legalization these can be huge.
846+
/// Convenience wrapper around TargetLowering::getShiftAmountTy.
848847
EVT getShiftAmountTy(EVT LHSTy) {
849-
assert(LHSTy.isInteger() && "Shift amount is not an integer type!");
850848
return TLI.getShiftAmountTy(LHSTy, DAG.getDataLayout());
851849
}
852850

0 commit comments

Comments
 (0)