Fixed Bug 24649.
Now the optimization will search for the right GPR type depends on the architecture size 32bit or 64bit.
Details
Diff Detail
Event Timeline
Thanks, Amjad!
Can you also fix pop-stack-cleanup.ll to also check the 64-bit case?
lib/Target/X86/X86FrameLowering.cpp | ||
---|---|---|
1853 | I think this should not be strictly necessary, because if it's negative, NumPops will also be negative, so it will never be 1 or 2. But if you think it makes the intent clearer, that's ok. | |
1877 | Argh, right, thanks. I wonder how this manages to work correctly with integrated-as... |
lib/Target/X86/X86FrameLowering.cpp | ||
---|---|---|
1853 | The % of negative numbers are not well defined, especially, as offset is an "int" and "SlotSize" is an "unsigned int". |
lib/Target/X86/X86FrameLowering.cpp | ||
---|---|---|
1853 | Ohhh, right, forgot the sign is implementation-defined! |
I think this should not be strictly necessary, because if it's negative, NumPops will also be negative, so it will never be 1 or 2. But if you think it makes the intent clearer, that's ok.