[all-commits] [llvm/llvm-project] bafdd1: [SVE] Replace / operator in TypeSize/ElementCount ...
david-arm via All-commits
all-commits at lists.llvm.org
Mon Sep 28 00:28:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bafdd11326a46421b68f68c794fd189c77a32e15
https://github.com/llvm/llvm-project/commit/bafdd11326a46421b68f68c794fd189c77a32e15
Author: David Sherwood <david.sherwood at arm.com>
Date: 2020-09-28 (Mon, 28 Sep 2020)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
M llvm/include/llvm/CodeGen/ValueTypes.h
M llvm/include/llvm/IR/DerivedTypes.h
M llvm/include/llvm/Support/MachineValueType.h
M llvm/include/llvm/Support/TypeSize.h
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
M llvm/lib/CodeGen/TargetLoweringBase.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
M llvm/unittests/IR/VectorTypesTest.cpp
Log Message:
-----------
[SVE] Replace / operator in TypeSize/ElementCount with divideCoefficientBy
After some recent upstream discussion we decided that it was best
to avoid having the / operator for both ElementCount and TypeSize,
since this could give the impression that these classes can be used
in the same way as basic integer integer types. However, division
for scalable types is a bit odd because we are only dividing the
minimum quantity by a value, as opposed to something like:
(MinSize * Vscale) / SomeValue
This is why when performing division it's important the caller
first establishes whether the operation makes sense, perhaps by
calling isKnownMultipleOf() prior to division. The caller must now
explictly call divideCoefficientBy() on the class to perform the
operation.
Differential Revision: https://reviews.llvm.org/D87700
More information about the All-commits
mailing list