summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSameer AbuAsal <sabuasal@codeaurora.org>2018-04-12 19:22:40 +0000
committerSameer AbuAsal <sabuasal@codeaurora.org>2018-04-12 19:22:40 +0000
commite8b7ff30e21628de4614d99765147da6948addd6 (patch)
tree4d18656283ec9f05ee3dc5adb85ae763abcbb27d /clang/lib/Frontend/CompilerInvocation.cpp
parent35935c06329bfc48ad4f14dd715fbe18618fc268 (diff)
downloadbcm5719-llvm-e8b7ff30e21628de4614d99765147da6948addd6.tar.gz
bcm5719-llvm-e8b7ff30e21628de4614d99765147da6948addd6.zip
[RISCV] Add c.mv rs1, rs2 pattern for addi rs1, rs2, 0
Summary: GCC compresses the pseudo instruction "mv rd, rs", which is an alias of "addi rd, rs, 0", to "c.mv rd, rs". In LLVM we rely on the canonical MC instruction (MCInst) to do our compression checks and since there is no rule to compress "addi rd, rs, 0" --> "c.mv rd, rs" we lose this compression opportunity to gcc. In this patch we fix that by adding an addi to c.mv compression pattern, the instruction "mv rd, rs" will be compressed to "c.mv rd, rs" just like gcc does. Patch by Zhaoshi Zheng (zzheng) and Sameer (sabuasal). Reviewers: asb, apazos, zzheng, mgrang, shiva0217 Reviewed By: asb Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, niosHD, kito-cheng, llvm-commits Differential Revision: https://reviews.llvm.org/D45583 llvm-svn: 329939
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud