mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 16:31:16 +00:00
c1be92f3bb
does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116720 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
460 B
LLVM
25 lines
460 B
LLVM
; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
|
|
|
|
define i32 @main(i32** %p) {
|
|
block1:
|
|
br i1 true, label %block2, label %block3
|
|
|
|
block2:
|
|
%a = load i32** %p
|
|
br label %block4
|
|
|
|
block3:
|
|
%b = load i32** %p
|
|
br label %block4
|
|
|
|
block4:
|
|
; CHECK-NOT: %existingPHI = phi
|
|
; CHECK: %DEAD = phi
|
|
%existingPHI = phi i32* [ %a, %block2 ], [ %b, %block3 ]
|
|
%DEAD = load i32** %p
|
|
%c = load i32* %DEAD
|
|
%d = load i32* %existingPHI
|
|
%e = add i32 %c, %d
|
|
ret i32 %e
|
|
}
|