https://bugs.llvm.org/show_bug.cgi?id=51206
Bug ID: 51206
Summary: [RISCV] Infinite loop after D104581
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: RISC-V
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs