aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-02-08 11:28:06 -0800
committerGitHub <noreply@github.com>2024-02-08 11:28:06 -0800
commitd0f72f88606b78447fb7b61214651854c787c26f (patch)
tree1239cad761991a183f49e5eaa1a716702035fa38 /llvm/lib/IR/Function.cpp
parent88e52511ca71165f1ff3d7c42229aeacb2c16db3 (diff)
downloadllvm-d0f72f88606b78447fb7b61214651854c787c26f.zip
llvm-d0f72f88606b78447fb7b61214651854c787c26f.tar.gz
llvm-d0f72f88606b78447fb7b61214651854c787c26f.tar.bz2
[RISCV] Consider truncate semantics in performBUILD_VECTORCombine (#81168)
Fixes https://github.com/llvm/llvm-project/issues/80910. Per the documentation in ISDOpcodes.h, for BUILD_VECTOR "The types of the operands must match the vector element type, except that integer types are allowed to be larger than the element type, in which case the operands are implicitly truncated." This transform was assuming that the scalar operand type matched the result type. This resulted in essentially performing a truncate before a binop, instead of after. As demonstrated by the test case changes, this is often not legal.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions