[all-commits] [llvm/llvm-project] e24a85: [SelectionDAG][RISCV] Remove code for handling too...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue May 16 20:02:28 PDT 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: e24a8596a81b904db37d114f91200d7b5cf89683
https://github.com/llvm/llvm-project/commit/e24a8596a81b904db37d114f91200d7b5cf89683
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
A llvm/test/CodeGen/RISCV/rvv/pr61561.ll
Log Message:
-----------
[SelectionDAG][RISCV] Remove code for handling too small shift type from SimplifyDemandedBits.
This code detected that the type returned from getShiftAmountTy was
too small to hold the constant shift amount. But it used the full
type size instead of scalar type size leading it to crash for
scalable vectors.
This code was necessary when getShiftAmountTy would always
return the target preferred shift amount type for scalars even when
the type was an illegal type larger than the target supported. For
vectors, getShiftAmountTy has always returned the vector type.
Fortunately, getShiftAmountTy was fixed a while ago to detect that
the target's preferred size for scalars is not large enough for the
type. So we can delete this code.
Switched to use getShiftAmountConstant to further simplify the code.
Fixs PR61561.
(cherry picked from commit a37df84f99ebe68c3e9cc533ffd3952fb22d1f38)
More information about the All-commits
mailing list