Skip to content

Commit 60dc4a9

Browse files
committed
Add description
1 parent 54cbcc8 commit 60dc4a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/X86/X86FixupVectorConstants.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ bool X86FixupVectorConstantsPass::processInstruction(MachineFunction &MF,
403403
unsigned CstBitWidth = C->getType()->getPrimitiveSizeInBits();
404404
RegBitWidth = RegBitWidth ? RegBitWidth : CstBitWidth;
405405
for (const FixupEntry &Fixup : Fixups) {
406+
// Always uses the smallest possible constant load with opt/minsize,
407+
// otherwise use the smallest instruction that doesn't affect
408+
// performance.
409+
// TODO: If constant has been hoisted from loop, use smallest constant.
406410
if (Fixup.Op && (OptSize || NewOpcPreferable(Fixup, RegBitWidth))) {
407411
// Construct a suitable constant and adjust the MI to use the new
408412
// constant pool entry.

0 commit comments

Comments
 (0)