This is an archive of the discontinued LLVM Phabricator instance.

[RISC-V] add more tests for analyzeBranch with zero-comparison. NFC
AbandonedPublic

Authored by inclyc on Jul 31 2022, 12:18 AM.

Details

Summary

Functions of branch analysis firstly introduced in
https://reviews.llvm.org/D40808, This patch add more tests in
analyze-branch.ll which have zero-comparison instruction,
in this case beqz, because this instruction has one less operand
than previously tested.

Signed-off-by: YingChi Long <me@inclyc.cn>

Diff Detail

Event Timeline

inclyc created this revision.Jul 31 2022, 12:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2022, 12:18 AM
inclyc requested review of this revision.Jul 31 2022, 12:18 AM
inclyc added inline comments.Jul 31 2022, 12:30 AM
llvm/test/CodeGen/RISCV/analyze-branch.ll
15

In previous versions, the name of this function seemed to be derived from the test file of AAarch64 (see https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/analyze-branch.ll). In order to make the meaning of this test file more concise and understandable, I changed this to beq.

Why are these tests interesting? The MC instruction doesn’t have any fewer operands, it’s still a BEQ. BEQZ is just an alias in the textual assembly.

inclyc abandoned this revision.Jul 31 2022, 9:21 AM

Sorry for wasting your time, I might have some misunderstanding of MC codes.