[all-commits] [llvm/llvm-project] 8d7755: [Analysis] Ensure getTypeLegalizationCost returns ...
david-arm via All-commits
all-commits at lists.llvm.org
Wed Nov 17 05:12:44 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d77555b1234a2620238125328160dbe88a5e487
https://github.com/llvm/llvm-project/commit/8d77555b1234a2620238125328160dbe88a5e487
Author: David Sherwood <david.sherwood at arm.com>
Date: 2021-11-17 (Wed, 17 Nov 2021)
Changed paths:
M llvm/lib/CodeGen/TargetLoweringBase.cpp
M llvm/test/Transforms/LoopVectorize/AArch64/sve-inductions-unusual-types.ll
Log Message:
-----------
[Analysis] Ensure getTypeLegalizationCost returns a simple VT for TypeScalarizeScalableVector
When getTypeConversion returns TypeScalarizeScalableVector we were
sometimes returning a non-simple type from getTypeLegalizationCost.
However, many callers depend upon this being a simple type and will
crash if not. This patch changes getTypeLegalizationCost to ensure
that we always a return sensible simple VT. If the vector type
contains unusual integer types, e.g. <vscale x 2 x i3>, then we just
set the type to MVT::i64 as a reasonable default.
A test has been added here that demonstrates the vectoriser can
correctly calculate the cost of vectorising a "zext i3 to i64"
instruction with a VF=vscale x 1:
Transforms/LoopVectorize/AArch64/sve-inductions-unusual-types.ll
Differential Revision: https://reviews.llvm.org/D113777
More information about the All-commits
mailing list