[all-commits] [llvm/llvm-project] 08a8e1: [InstCombine] Move extends across identity shuffle...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon Jul 14 13:01:24 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 08a8e1c6b62215bf0b410f297add76f4e3b068d7
https://github.com/llvm/llvm-project/commit/08a8e1c6b62215bf0b410f297add76f4e3b068d7
Author: Florian Hahn <flo at fhahn.com>
Date: 2025-07-14 (Mon, 14 Jul 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
M llvm/test/Transforms/InstCombine/X86/blend_x86.ll
M llvm/test/Transforms/InstCombine/fold-shuffle-ext.ll
M llvm/test/Transforms/PhaseOrdering/X86/blendv-select.ll
Log Message:
-----------
[InstCombine] Move extends across identity shuffles. (#146901)
Add a new fold to instcombine to move SExt/ZExt across identity
shuffles, applying the cast after the shuffle. This sinks extends and
can enable more general additional folding of both shuffles (and
related instructions) and extends. If backends prefer splitting up doing
casts first, the extends can be hoisted again in VectorCombine for
example.
A larger example is included in the load_i32_zext_to_v4i32. The wider
extend is easier to compute an accurate cost for and targets (like
AArch64) can lower a single wider extend more efficiently than multiple
separate extends.
This is a generalization of a VectorCombine version
(https://github.com/llvm/llvm-project/pull/141109) as suggested by
@preames.
PR: https://github.com/llvm/llvm-project/pull/146901
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list