Skip to content

Commit 87275b2

Browse files
committed
[RISCV][NFC] Explain isShifted359 in a comment
1 parent 498acc9 commit 87275b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525

2626
namespace llvm {
2727

28+
// If Value is of the form C1<<C2, where C1 = 3, 5 or 9,
29+
// returns log2(C1 - 1) and assigns Shift = C2.
30+
// Otherwise, returns 0.
2831
template <typename T> int isShifted359(T Value, int &Shift) {
2932
if (Value == 0)
3033
return 0;

0 commit comments

Comments
 (0)