mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
6f510dfce8
Fix the use-list-order for br instructions by setting the operands in order of their index to match the use-list-order prediction. The case where this matters is when there is a condition but the if-true and if-false branches are identical. Bug was found when reviewing failures pointed at by https://reviews.llvm.org/D104950. Fix is similar to 3cf415c6c367ced43175ebd1dc4bd9582c7f5376. Differential Revision: https://reviews.llvm.org/D104959
12 lines
243 B
LLVM
12 lines
243 B
LLVM
; RUN: llvm-as < %s -disable-output 2>&1 | FileCheck %s -allow-empty
|
|
; CHECK-NOT: error
|
|
; CHECK-NOT: warning
|
|
; RUN: verify-uselistorder < %s
|
|
|
|
define void @f1(i1 %cmp) {
|
|
entry:
|
|
br i1 %cmp, label %branch, label %branch
|
|
branch:
|
|
unreachable
|
|
}
|