llvm-mirror/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

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}