[PATCH] D128911: Emit table lookup from TargetLowering::expandCTTZ()

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 09:02:27 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8037
+      !isOperationLegal(ISD::CTLZ, VT))
+    return CTTZTableLookup(Node, DAG, dl, VT, Op, NumBitsPerElt);
+
----------------
craig.topper wrote:
> This needs to be
> 
> ```
> if (SDValue V = CTTZTableLookup(Node, DAG, dl, VT, Op, NumBitsPerElt))
>   return V;
> ```
> 
> Because there is an early out in CTTZTableLookup for types other than i32/i64.
That will fix the AVR failure


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128911/new/

https://reviews.llvm.org/D128911



More information about the llvm-commits mailing list