Skip to content

Instantly share code, notes, and snippets.

@aqjune
Created May 18, 2020 04:04
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 aqjune/d3d76604f28a71f8e4af565856b83eac to your computer and use it in GitHub Desktop.
Save aqjune/d3d76604f28a71f8e4af565856b83eac to your computer and use it in GitHub Desktop.
target datalayout="e"
;target datalayout="E" ; both is fine
define void @src(i8** %q) {
%ofs = shl i64 7, 60
%p = getelementptr i8, i8* null, i64 %ofs
store i8* %p, i8** %q
ret void
}
define void @tgt(i8** %q) {
store i8* null, i8** %q
%q2 = bitcast i8** %q to i8*
store i8 0, i8* %q2
ret void
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment