Skip to content

Commit bddc9f8

Browse files
committed
Add comment describing ByteOffset param
1 parent d2d0597 commit bddc9f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,8 @@ class TargetLoweringBase {
18231823
virtual bool ShouldShrinkFPConstant(EVT) const { return true; }
18241824

18251825
/// Return true if it is profitable to reduce a load to a smaller type.
1826+
/// \p ByteOffset is only set if we know the pointer offset at compile time
1827+
/// otherwise we should assume that additional pointer math is required.
18261828
/// Example: (i16 (trunc (i32 (load x))) -> i16 load x
18271829
/// Example: (i16 (trunc (srl (i32 (load x)), 16)) -> i16 load x+2
18281830
virtual bool shouldReduceLoadWidth(

0 commit comments

Comments
 (0)