Skip to content

Instantly share code, notes, and snippets.

@phalcon
Created April 9, 2014 23:07
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 phalcon/10328189 to your computer and use it in GitHub Desktop.
Save phalcon/10328189 to your computer and use it in GitHub Desktop.
; Function Attrs: nounwind ssp uwtable
define i32 @x(%struct._zval_struct* %z) #0 {
%1 = alloca %struct._zval_struct*, align 8
store %struct._zval_struct* %z, %struct._zval_struct** %1, align 8
%2 = load %struct._zval_struct** %1, align 8
%3 = getelementptr inbounds %struct._zval_struct* %2, i32 0, i32 2
%4 = load i8* %3, align 1
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %12
; <label>:7 ; preds = %0
%8 = load %struct._zval_struct** %1, align 8
%9 = getelementptr inbounds %struct._zval_struct* %8, i32 0, i32 0
%10 = bitcast %union._zvalue_value* %9 to i64*
%11 = load i64* %10, align 8
br label %15
; <label>:12 ; preds = %0
%13 = load %struct._zval_struct** %1, align 8
%14 = call i64 @zephir_get_intval_ex(%struct._zval_struct* %13)
br label %15
; <label>:15 ; preds = %12, %7
%16 = phi i64 [ %11, %7 ], [ %14, %12 ]
%17 = trunc i64 %16 to i32
ret i32 %17
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment