Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 0.58 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.   ;%A64 = bitcast [100 x i8]* %stack to i64*
  10.   %A = getelementptr inbounds [100 x i8], [100 x i8]* %stack, i64 0, i64 8
  11.   %A64 = bitcast i8* %A to i64*
  12.   %B = getelementptr inbounds i8, i8* %A, i64 16
  13.   %B32 = bitcast i8* %B 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