PC-Relative addressing introduces a fair bit of complexity for correctly eliminating TOC accesses. FastISel does not include any of that handling so we miscompile code with -mcpu=pwr10 -O0 if it includes an external call that FastISel does not handle followed by any of the following:
- Floating point constant materialization
- Materialization of a GlobalValue
- Call that FastISel does handle
This patch switches to SDISel for any of the above.
nit: if this is a