[all-commits] [llvm/llvm-project] 6f8190: [LV][SLP] Mark fptosi_sat as vectorizable
David Green via All-commits
all-commits at lists.llvm.org
Tue May 3 01:32:49 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6f81903e891cdc19d856d19efcc45a0d19f3ff8d
https://github.com/llvm/llvm-project/commit/6f81903e891cdc19d856d19efcc45a0d19f3ff8d
Author: David Green <david.green at arm.com>
Date: 2022-05-03 (Tue, 03 May 2022)
Changed paths:
M llvm/include/llvm/Analysis/VectorUtils.h
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Analysis/VectorUtils.cpp
M llvm/lib/CodeGen/ReplaceWithVeclib.cpp
M llvm/lib/Transforms/Scalar/Scalarizer.cpp
M llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/LoopVectorize/fpsat.ll
M llvm/test/Transforms/SLPVectorizer/AArch64/fpsat.ll
M llvm/test/Transforms/Scalarizer/intrinsics.ll
Log Message:
-----------
[LV][SLP] Mark fptosi_sat as vectorizable
This adds fptosi_sat and fptoui_sat to the list of trivially
vectorizable functions, mainly so that the loop vectorizer can vectorize
the instruction. Marking them as trivially vectorizable also allows them
to be SLP vectorized, and Scalarized.
The signature of a fptosi_sat requires two type overrides
(@llvm.fptosi.sat.v2i32.v2f32), unlike other intrinsics that often only
take a single. This patch alters hasVectorInstrinsicOverloadedScalarOpd
to isVectorIntrinsicWithOverloadTypeAtArg, so that it can mark the first
operand of the intrinsic as a overloaded (but not scalar) operand.
Differential Revision: https://reviews.llvm.org/D124358
More information about the All-commits
mailing list