Skip to content

Commit aba3aaa

Browse files
[RISCV][BranchFolding] Precommit test case
1 parent f4d599c commit aba3aaa

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

llvm/test/CodeGen/RISCV/branch_zero.ll

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,22 @@ exit1:
8383
if.then:
8484
br label %for.body
8585
}
86+
87+
define ptr @baz() {
88+
; CHECK-LABEL: baz:
89+
; CHECK: # %bb.0: # %entry
90+
; CHECK-NEXT: beqz zero, .LBB2_2
91+
; CHECK-NEXT: # %bb.1: # %if.end12
92+
; CHECK-NEXT: li a0, 0
93+
; CHECK-NEXT: ret
94+
; CHECK-NEXT: .LBB2_2: # %if.then10
95+
entry:
96+
%or.cond = or i1 false, false
97+
br i1 %or.cond, label %if.end12, label %if.then10
98+
99+
if.then10: ; preds = %entry
100+
unreachable
101+
102+
if.end12: ; preds = %entry
103+
ret ptr null
104+
}

0 commit comments

Comments
 (0)