[llvm] [AArch64] canCreateUndefOrPoisonForTargetNode - AArch64ISD::VASHR\VLSHR\VSHL can't create undef/poison (PR #156445)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 07:18:09 PDT 2025
davemgreen wrote:
> OK - should I assert an inrange ConstantSDNode value or just assume it? I can add VLSHR/VSHL as well but don't currently have test coverage for them - I'll see if we can add it to AArch64SelectionDAGTest.cpp
We select these nodes to the instructions with constant shifts in the range of 1-BW, so slightly outside of normal ranges but all produce valid values (no poisons). Assuming this is true should be fine, it should fail elsewhere if not.
> I'll see if I can add test coverage for this - some of the freeze folds will strip poison flags like Exact when they push the freeze through the node - could that be whats causing the regression?
The `exact` flag is used just to produce SCVTF _shift instructions as far as I understand. Am I correct that a shift with an `exact` flag will produce poison if non-zeroes are shifted out? It doesn't seem to be part of the ValueTracking canCreateUndefOrPoison or SelectionDAG::canCreateUndefOrPoison.
https://github.com/llvm/llvm-project/pull/156445
More information about the llvm-commits
mailing list