Skip to content

Commit 1d5e5f4

Browse files
[GISEL][NFC] Fix comment for widenScalarToNextPow2
The docstring for this function incorrectly specified when a widening is not performed. This patch adds the additional specification for what happens when the type size is a power of two but it is less than MinSize.
1 parent 0478adc commit 1d5e5f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,8 @@ class LegalizeRuleSet {
879879
}
880880

881881
/// Widen the scalar to the next power of two that is at least MinSize.
882-
/// No effect if the type is not a scalar or is a power of two.
882+
/// No effect if the type is a power of two, except if the type is smaller
883+
/// than MinSize, or if the type is a vector type.
883884
LegalizeRuleSet &widenScalarToNextPow2(unsigned TypeIdx,
884885
unsigned MinSize = 0) {
885886
using namespace LegalityPredicates;

0 commit comments

Comments
 (0)