Skip to content

Instantly share code, notes, and snippets.

@ramntry
Created May 15, 2018 09:02
Embed
What would you like to do?
define void @test_phi_diamond({ i8, i16, i32 }* %a.ptr, { i8, i16, i32 }* %b.ptr, i1 %selector, { i8, i16, i32 }* %dst) {
entry:
br i1 %selector, label %store.a, label %store.b
store.a:
%a = load { i8, i16, i32 }, { i8, i16, i32 }* %a.ptr
br label %join
store.b:
%b = load { i8, i16, i32 }, { i8, i16, i32 }* %b.ptr
br label %join
join:
%v = phi { i8, i16, i32 } [ %a, %store.a ], [ %b, %store.b ]
store { i8, i16, i32 } %v, { i8, i16, i32 }* %dst
ret void
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment