aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-08-04 11:16:27 -0700
committerCraig Topper <craig.topper@sifive.com>2022-08-04 11:25:08 -0700
commita2de12c987339f228f7fa412222f7e7746e220ed (patch)
treeae0f0a2b115003465087326e6e9bde3d84424b0e /clang/lib/Frontend/CompilerInvocation.cpp
parentbefa77e59a7760d8c4fdd177b234e4a59500f61c (diff)
downloadllvm-a2de12c987339f228f7fa412222f7e7746e220ed.zip
llvm-a2de12c987339f228f7fa412222f7e7746e220ed.tar.gz
llvm-a2de12c987339f228f7fa412222f7e7746e220ed.tar.bz2
[RISCV] Relax a one use restriction performSRACombine
When folding (sra (add (shl X, 32), C1), 32 - C) -> (shl (sext_inreg (add X, C1), C) ignore the use count on the (shl X, 32). The sext_inreg after the transform is free. So we're only making 2 new instructions, the add and the shl. So we only need to be concerned with replacing the original sra+add. The original shl can have other uses. This helps if there are multiple different constants being added to the same shl.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions