aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2022-09-22 15:21:05 -0700
committerPhilip Reames <listmail@philipreames.com>2022-09-22 15:31:26 -0700
commit60c91fd364476b3844d2c81fc73c4e32b8d04fa6 (patch)
treea8fda105e4dabd83f0b9a10818a5407564bdbf4a /clang/lib/Frontend/CompilerInvocation.cpp
parentbad2e6c830de8c6ddc72f7ba3ace068fb62448ff (diff)
downloadllvm-60c91fd364476b3844d2c81fc73c4e32b8d04fa6.zip
llvm-60c91fd364476b3844d2c81fc73c4e32b8d04fa6.tar.gz
llvm-60c91fd364476b3844d2c81fc73c4e32b8d04fa6.tar.bz2
[RISCV] Disallow scale for scatter/gather
RISCV doesn't actually support a scaled form of indexed load and store. We previously handled this by forming the scaled SDNode, and then doing custom legalization during lowering. This patch instead adds a callback via TLI to prevent formation entirely. This has two effects: * First, the GEP gets expanded (and used). Instead of the shift being created with an SDLoc of the memory operation, it has the SDLoc of the GEP instruction. This avoids the scheduler perturbing IR order when there's no reason to. * Second, we fix what appears to be a bug in index calculation with RV32. The rules for GEPs require index calculation be done in particular bitwidth, and it appears the custom legalization code got this wrong for the case where index type exceeds pointer width. (Or at least, I trust the generic GEP lowering to be correct a lot more.) The DAGCombiner change to handle VPScatter/VPGather is technically separate, but is required to prevent a regression on those intrinsics. Differential Revision: https://reviews.llvm.org/D134382
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions