-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instruction Combining misoptimization #1871
Comments
The problematic function (ffmpeg/libavutil/rational.h): /**
/**
I think the comment is wrong. This function returns 0 if a==b, 1 if a>b and |
fix |
The patch is close, but not quite right. The sign bit definitely does need to be demanded in some %Y = ashr i8 %X, 3 If we demand (f.e.) the low two bits from Y, then the input sign bit is not needed. However, if any of So basically, in that code, if any of the "high bits" are demanded, you should set the sign bit as Thanks again for investigating this Lauro! -Chris |
Extended Description
Instruction Combining is wrongly optimizing the following code:
to
store i32 -1, i32* %tmp9
store i32 -1, i32* %retval
ret void
The text was updated successfully, but these errors were encountered: