mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
bf7f89f132
Reviewed By: hfinkel Differential Revision: http://reviews.llvm.org/D13953 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251809 91177308-0d34-0410-b5e6-96231b3b80d8
33 lines
619 B
LLVM
33 lines
619 B
LLVM
; RUN: opt < %s -simplifycfg -S | FileCheck %s
|
|
|
|
declare void @bar(i32*)
|
|
declare void @baz(i32*)
|
|
|
|
; CHECK-LABEL: @test_load_combine_metadata(
|
|
; Check that align metadata is combined
|
|
; CHECK: load i32*, i32** %p
|
|
; CHECK-SAME: !align ![[ALIGN:[0-9]+]]
|
|
; CHECK: t:
|
|
; CHECK: f:
|
|
define void @test_load_combine_metadata(i1 %c, i32** %p) {
|
|
br i1 %c, label %t, label %f
|
|
|
|
t:
|
|
%v1 = load i32*, i32** %p, !align !0
|
|
call void @bar(i32* %v1)
|
|
br label %cont
|
|
|
|
f:
|
|
%v2 = load i32*, i32** %p, !align !1
|
|
call void @baz(i32* %v2)
|
|
br label %cont
|
|
|
|
cont:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: ![[ALIGN]] = !{i64 8}
|
|
|
|
!0 = !{i64 8}
|
|
!1 = !{i64 16}
|