Vector fold shl(x,1) ->add(freeze(x),freeze(x)) to avoid the undef issues identified in PR50468
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Cheers - I've added this link to https://bugs.llvm.org/show_bug.cgi?id=50468 for reference
Comment Actions
Rebase to see how close we are now - we're still missing a DAG equivalent of pushFreezeToPreventPoisonFromPropagating to stop freeze nodes obscuring some folds.
Comment Actions
Move the (shl V, 1) -> (add (freeze V),(freeze V)) fold inside LowerShiftByScalarImmediate so it's only attempted on legal types.
With the recently improved freeze combines this appears to fix most of the regressions we were seeing.
llvm/test/CodeGen/X86/oddsubvector.ll | ||
---|---|---|
232 | We've lost a INSERT_VECTOR_ELT -> (dependency breaking) SCALAR_TO_VECTOR optimization - still investigating this. |
We've lost a INSERT_VECTOR_ELT -> (dependency breaking) SCALAR_TO_VECTOR optimization - still investigating this.