The attached patch improves machine-independent optimizations based on information from generalized constant propagation.
Regression tests results looks mostly, good, but for ds390 setjmp/longjmp tests fail with timeout.
It looks like the ds390 problem happens in longjmp: A variable is assigned to dptr even though is is live at a pointer read, and thus overwritten. Apparently a missing isaddr flag on the left operand of the pointer read confuses the ds390 register allocator.
I don't know yet why the isaddr flag is missing, but it looks like the cause is unrelated to generalized constant propagation (but genconstprop changes the function, which in turn results in the issue being triggered in the register allocator).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like the ds390 problem happens in longjmp: A variable is assigned to dptr even though is is live at a pointer read, and thus overwritten. Apparently a missing isaddr flag on the left operand of the pointer read confuses the ds390 register allocator.
I don't know yet why the isaddr flag is missing, but it looks like the cause is unrelated to generalized constant propagation (but genconstprop changes the function, which in turn results in the issue being triggered in the register allocator).
I fixed the ds390 issues in [r14345], and committed the improved optimizations in [r14346].
Related
Commit: [r14345]
Commit: [r14346]