diff options
author | ZhaoQi <zhaoqi01@loongson.cn> | 2023-11-23 16:38:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-23 16:38:41 +0800 |
commit | 1c68c4c57a65a67963264878bc4646be8b58854c (patch) | |
tree | 362257ef1c95abe30e4ebc44a2d95cc9068ea1b9 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 6367677c9d901f412934b4935c4341dc6d421d36 (diff) | |
download | llvm-1c68c4c57a65a67963264878bc4646be8b58854c.zip llvm-1c68c4c57a65a67963264878bc4646be8b58854c.tar.gz llvm-1c68c4c57a65a67963264878bc4646be8b58854c.tar.bz2 |
[LoongArch][MC] Modify branch evaluation for MCInstrAnalysis (#73205)
Function evaluateBranch() is used to compute target address for a given
branch instruction and return true on success. But target address of
indirect branch cannot be simply added, so rule it out and just return
false.
This patch also add objdump tests which capture the current state of
support for printing branch targets. Without this patch, the result of
"jirl $zero, $a0, 4" is "jirl $zero, $a0, 4 <foo+0x64>". It is obviously
incorrect, because this instruction represents an indirect branch whose
target address depends on both the register value and the imm. After
this patch, it will be right despite loss of details.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions