SHARE
TWEET

Untitled

a guest Dec 19th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define i64 @test2(i64 %X, i32 %Y) {
  2. ; CHECK-LABEL: @test2(
  3. ; CHECK-NOT: alloca
  4. ; CHECK: ret i64 %X
  5.  
  6. entry:
  7.   %stack = alloca [100 x i8]
  8.   ;%A64 = bitcast [100 x i8]* %stack to i64*
  9.   %A = getelementptr inbounds [100 x i8], [100 x i8]* %stack, i64 0, i64 8
  10.   %A64 = bitcast i8* %A to i64*
  11.   %B = getelementptr inbounds [100 x i8], [100 x i8]* %stack, i64 0, i64 16
  12.   %B32 = bitcast i8* %B to i32*
  13.   store i64 %X, i64* %A64
  14.   ;store i32 %Y, i32* %B32
  15.   br label %L2
  16.  
  17. L2:
  18.   %Z = load i64, i64* %A64
  19.   %W = load i32, i32* %B32
  20.   %WW = zext i32 %W to i64
  21.   %R = add i64 %Z, %WW
  22.   ret i64 %R
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top