-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[RISCV] Infinite loop after D104581 #50550
Labels
Comments
Fixed by 54588bc Also here's the link the ClangBuiltLinux report for this ClangBuiltLinux/linux#1431 |
Merged: 9ac5717 |
mentioned in issue #51489 |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extended Description
As reported in D104581 this test causes an infinite loop when compiled with -O2
char aspeed_set_pwm_port_fan_ctrl_priv_0_0,
aspeed_set_pwm_port_fan_ctrl_fan_ctrl;
pwm_store_period, pwm_store_dc_time_on;
pwm_store() {
pwm_store_period = aspeed_set_pwm_port_fan_ctrl_priv_0_0;
pwm_store_period += 1;
pwm_store_dc_time_on =
aspeed_set_pwm_port_fan_ctrl_fan_ctrl * pwm_store_period / 5;
if (pwm_store_dc_time_on)
aspeed_set_pwm_port_duty_rising_falling();
}
The combine from D104581 turns an any_extend into a sign_extend. This gets converted to a zero_extend as the sign bit of input is known to be 0. Then a setcc combine shrinks the setcc inputs back to the pre zero extended value. This allows the zero extend to become an any_extend again. Then the whole process starts over.
The text was updated successfully, but these errors were encountered: