mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 05:31:06 +00:00
90c42ddc62
LoopRotate wanted to avoid live range interference by looking at the uses of a Value in the loop latch and seeing if any lied outside of the loop. We would wrongly perform this operation on Constants. This fixes PR22337. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227171 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
448 B
LLVM
25 lines
448 B
LLVM
; RUN: opt < %s -loop-rotate -S | FileCheck %s
|
|
|
|
@a = external global i8, align 4
|
|
@tmp = global i8* @a
|
|
|
|
define void @f() {
|
|
; CHECK-LABEL: define void @f(
|
|
; CHECK: getelementptr i8* @a, i32 0
|
|
entry:
|
|
br label %for.preheader
|
|
|
|
for.preheader:
|
|
br i1 undef, label %if.then8, label %for.body
|
|
|
|
for.body:
|
|
br i1 undef, label %if.end, label %if.then8
|
|
|
|
if.end:
|
|
%arrayidx = getelementptr i8* @a, i32 0
|
|
br label %for.preheader
|
|
|
|
if.then8:
|
|
unreachable
|
|
}
|