[llvm] [AArch64] Fix a presumed typo in isFPImmLegal limit. NFC (PR #106716)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 06:57:06 PDT 2024


================
@@ -11463,7 +11463,8 @@ bool AArch64TargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
     // movw+movk is fused). So we limit up to 2 instrdduction at most.
     SmallVector<AArch64_IMM::ImmInsnModel, 4> Insn;
     AArch64_IMM::expandMOVImm(ImmInt.getZExtValue(), VT.getSizeInBits(), Insn);
-    unsigned Limit = (OptForSize ? 1 : (Subtarget->hasFuseLiterals() ? 5 : 2));
+    assert(Insn.size() <= 4);
----------------
fhahn wrote:

Would be good to add a message to the assert(`&& "...")`

https://github.com/llvm/llvm-project/pull/106716


More information about the llvm-commits mailing list