search for: _z5sumad

Displaying 1 result from an estimated 1 matches for "_z5sumad".

2016 Apr 14
2
Little explanation of this behaviour
...returns the sum between an signed char and a double in C++, just to see how Clang handles type implicit casting. Can you explain me why Clang converted the char type into a 32-bit integer type before casting it to a floating point? Can a sitofp i8 %3 to double be done or is it wrong? define i32 @_Z5sumad(i8 signext %x, double %y) #0 { %1 = alloca i8, align 1 %2 = alloca double, align 8 store i8 %x, i8* %1, align 1 store double %y, double* %2, align 8 %3 = load i8, i8* %1, align 1 %4 = sext i8 %3 to i32 %5 = sitofp i32 %4 to double %6 = load double, double* %2, align 8 %7 = fadd do...