Skip to content

Commit 4321b94

Browse files
committed
[GlobalISel] Correct comment about type vs register class
Type and register class aren't mutually exclusive in gMIR but target instructions don't have types on their operands that have register classes.
1 parent 4042038 commit 4321b94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
148148
LLT DstTy = MRI.getType(R);
149149

150150
// Handle the case where this is called on a register that does not have a
151-
// type constraint (i.e. it has a register class constraint instead). This is
152-
// unlikely to occur except by looking through copies but it is possible for
153-
// the initial register being queried to be in this state.
151+
// type constraint (i.e. it's a target instruction with a register class
152+
// constraint instead). This is unlikely to occur except by looking through
153+
// copies but it is possible for the initial register being queried to be in
154+
// this state.
154155
if (!DstTy.isValid()) {
155156
Known = KnownBits();
156157
return;

0 commit comments

Comments
 (0)