[all-commits] [llvm/llvm-project] 073e65: [LoopVectorize] Make needsExtract notice scalarize...
John Brawn via All-commits
all-commits at lists.llvm.org
Thu Jan 2 06:31:57 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 073e65a8e5f92ca9c63c3fcd1c0ce2a36913f9a6
https://github.com/llvm/llvm-project/commit/073e65a8e5f92ca9c63c3fcd1c0ce2a36913f9a6
Author: John Brawn <john.brawn at arm.com>
Date: 2025-01-02 (Thu, 02 Jan 2025)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/test/Transforms/LoopVectorize/AArch64/interleaved_cost.ll
M llvm/test/Transforms/LoopVectorize/ARM/mve-interleaved-cost.ll
Log Message:
-----------
[LoopVectorize] Make needsExtract notice scalarized instructions (#119720)
LoopVectorizationCostModel::needsExtract should recognise instructions
that have been widened by scalarizing as scalar instructions, and thus
not needing an extract when used by later scalarized instructions.
This fixes an incorrect cost calculation in computePredInstDiscount,
where we are adding a scalarization overhead cost when we shouldn't,
though I haven't come up with a test case where it makes a difference.
It will make a difference when the cost model switches to using the cost
kind TCK_CodeSize for optsize, as not doing this causes the test
LoopVectorize/X86/small-size.ll to get worse.
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