mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
29e13e0c18
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100787 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
549 B
LLVM
17 lines
549 B
LLVM
; Test to make sure unused llvm.invariant.start calls are not trivially eliminated
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
declare void @g(i8*)
|
|
|
|
declare {}* @llvm.invariant.start(i64, i8* nocapture) nounwind readonly
|
|
|
|
define i8 @f() {
|
|
%a = alloca i8 ; <i8*> [#uses=4]
|
|
store i8 0, i8* %a
|
|
%i = call {}* @llvm.invariant.start(i64 1, i8* %a) ; <{}*> [#uses=0]
|
|
; CHECK: call {}* @llvm.invariant.start
|
|
call void @g(i8* %a)
|
|
%r = load i8* %a ; <i8> [#uses=1]
|
|
ret i8 %r
|
|
}
|