[all-commits] [llvm/llvm-project] bb0d29: [LV] fix logical error in trunc cost (#91136)
Ramkumar Ramachandra via All-commits
all-commits at lists.llvm.org
Fri May 24 10:02:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb0d29a72d3a616ad6606c3996c39aba96f55615
https://github.com/llvm/llvm-project/commit/bb0d29a72d3a616ad6606c3996c39aba96f55615
Author: Ramkumar Ramachandra <r at artagnon.com>
Date: 2024-05-24 (Fri, 24 May 2024)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/test/Transforms/LoopVectorize/RISCV/pr88802.ll
M llvm/test/Transforms/LoopVectorize/SystemZ/pr47665.ll
Log Message:
-----------
[LV] fix logical error in trunc cost (#91136)
In LoopVectorizationCostModel::getInstructionCost(), when the condition
canTruncateToMinimalBitwidth() is satisfied, for a trunc, the source
type is computed as the smallest type of the source vector and the
destination vector, and the destination type is computed as the largest
type of the instruction and destination type. This is clearly a logical
error, as the original source vector type could be smaller than the
original destination vector type, and the trunc semantics are broken
because we're attempting to widen.
Fixes #47665.
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