-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Could you reproduce the error when running "opt" with LLVMEnzyme-15.so ? Thanks.
float Q_rsqrt( float number )
{
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = * ( long * ) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the [...]?
y = * ( float * ) &i;
y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
return y;
}
error: :0:0: in function preprocess_Q_rsqrt float (float): Enzyme: ; Function Attrs: mustprogress noinline nounwind willreturn uwtable
define dso_local float @preprocess_Q_rsqrt(float noundef %0) #10 {
%2 = fmul fast float %0, 5.000000e-01
%3 = bitcast float %0 to i32
%.sroa.6.0.insert.ext = zext i32 poison to i64
%.sroa.6.0.insert.shift = shl i64 %.sroa.6.0.insert.ext, 32
%.sroa.6.0.insert.mask = and i64 undef, 4294967295
%.sroa.6.0.insert.insert = or i64 %.sroa.6.0.insert.mask, %.sroa.6.0.insert.shift
%.sroa.0.0.insert.ext = zext i32 %3 to i64
%.sroa.0.0.insert.mask = and i64 %.sroa.6.0.insert.insert, -4294967296
%.sroa.0.0.insert.insert = or i64 %.sroa.0.0.insert.mask, %.sroa.0.0.insert.ext
%4 = ashr i64 %.sroa.0.0.insert.insert, 1
%5 = sub nsw i64 1597463007, %4
%.sroa.0.0.extract.trunc = trunc i64 %5 to i32
%.sroa.6.0.extract.shift = lshr i64 %5, 32
%.sroa.6.0.extract.trunc = trunc i64 %.sroa.6.0.extract.shift to i32
%6 = bitcast i32 %.sroa.0.0.extract.trunc to float
%7 = fmul fast float %2, %6
%8 = fmul fast float %7, %6
%9 = fsub fast float 1.500000e+00, %8
%10 = fmul fast float %6, %9
ret float %10
}
constantarg[float %0] = 0 type: {[-1]:Float@float} - vals: {}
constantinst[ %2 = fmul fast float %0, 5.000000e-01] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %3 = bitcast float %0 to i32] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %.sroa.6.0.insert.ext = zext i32 poison to i64] = 1 val:1 type: {[-1]:Anything}
constantinst[ %.sroa.6.0.insert.shift = shl i64 %.sroa.6.0.insert.ext, 32] = 1 val:1 type: {[-1]:Anything}
constantinst[ %.sroa.6.0.insert.mask = and i64 undef, 4294967295] = 1 val:1 type: {[-1]:Anything}
constantinst[ %.sroa.6.0.insert.insert = or i64 %.sroa.6.0.insert.mask, %.sroa.6.0.insert.shift] = 1 val:1 type: {[-1]:Anything}
constantinst[ %.sroa.0.0.insert.ext = zext i32 %3 to i64] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %.sroa.0.0.insert.mask = and i64 %.sroa.6.0.insert.insert, -4294967296] = 1 val:1 type: {[-1]:Anything}
constantinst[ %.sroa.0.0.insert.insert = or i64 %.sroa.0.0.insert.mask, %.sroa.0.0.insert.ext] = 0 val:0 type: {}
constantinst[ %4 = ashr i64 %.sroa.0.0.insert.insert, 1] = 0 val:0 type: {}
constantinst[ %5 = sub nsw i64 1597463007, %4] = 0 val:0 type: {[0]:Float@float}
constantinst[ %.sroa.0.0.extract.trunc = trunc i64 %5 to i32] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %.sroa.6.0.extract.shift = lshr i64 %5, 32] = 1 val:1 type: {}
constantinst[ %.sroa.6.0.extract.trunc = trunc i64 %.sroa.6.0.extract.shift to i32] = 1 val:1 type: {}
constantinst[ %6 = bitcast i32 %.sroa.0.0.extract.trunc to float] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %7 = fmul fast float %2, %6] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %8 = fmul fast float %7, %6] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %9 = fsub fast float 1.500000e+00, %8] = 0 val:0 type: {[-1]:Float@float}
constantinst[ %10 = fmul fast float %6, %9] = 0 val:0 type: {[-1]:Float@float}
constantinst[ ret float %10] = 1 val:1 type: {}
cannot handle unknown binary operator: %5 = sub nsw i64 1597463007, %4