Skip to content

Instantly share code, notes, and snippets.

@ramntry
Created May 15, 2018 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramntry/68a9d5e8f309df58497d2901788571a2 to your computer and use it in GitHub Desktop.
Save ramntry/68a9d5e8f309df58497d2901788571a2 to your computer and use it in GitHub Desktop.
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