This slightly extends the creation of hadd nodes to allow them to be generated with the original type size if wrapping flags allow.
https://alive2.llvm.org/ce/z/bPjakD
https://alive2.llvm.org/ce/z/fa_gzb
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM - see inline for possible logic simplification.
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | ||
---|---|---|
950–956 | It's semi-independent of this patch, but do we need this clause? We're looking for a "1" constant, so it would always get canonicalized to operand 1 of an incoming 'add'? |
Comment Actions
Note: I was confused by the patch description/title since "hadd" is a different operation on x86. This is about "ISD::AVG*" nodes.
It's semi-independent of this patch, but do we need this clause? We're looking for a "1" constant, so it would always get canonicalized to operand 1 of an incoming 'add'?