Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 0.53 KB | None | 0 0
  1.  
  2. define i64 @test2(i64 %X, i32 %Y) {
  3. ; CHECK-LABEL: @test2(
  4. ; CHECK-NOT: alloca
  5. ; CHECK: ret i64 %X
  6.  
  7. entry:
  8.   %stack = alloca [100 x i8]
  9.   %stack_int = ptrtoint [100 x i8]* %stack to i64
  10.   %Aint = add i64 %stack_int, 8
  11.   %A64 = inttoptr i64 %Aint to i64*
  12.   %Bint = add i64 %stack_int, 16
  13.   %B32 = inttoptr i64 %Bint to i32*
  14.   store i64 %X, i64* %A64
  15.   ;store i32 %Y, i32* %B32
  16.   br label %L2
  17.  
  18. L2:
  19.   %Z = load i64, i64* %A64
  20.   %W = load i32, i32* %B32
  21.   %WW = zext i32 %W to i64
  22.   %R = add i64 %Z, %WW
  23.   ret i64 %R
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement