linux-packaging-mono/external/llvm/test/Other/Inputs/invariant.group.barrier.ll
Xamarin Public Jenkins (auto-signing) e19d552987 Imported Upstream version 5.18.0.161
Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
2018-10-19 08:34:24 +00:00

16 lines
498 B
LLVM

; RUN: opt -S -gvn < %s | FileCheck %s
; RUN: opt -S -newgvn < %s | FileCheck %s
; RUN: opt -S -O3 < %s | FileCheck %s
; This test check if optimizer is not proving equality based on mustalias
; CHECK-LABEL: define void @dontProveEquality(i8* %a)
define void @dontProveEquality(i8* %a) {
%b = call i8* @llvm.invariant.group.barrier(i8* %a)
%r = i1 icmp eq i8* %b, i8* %a
;CHECK: call void @use(%r)
call void @use(%r)
}
declare void @use(i1)
declare i8* @llvm.invariant.group.barrier(i8 *)