[Bug target/68837] PowerPC switch statement performance

2020-06-10 Thread guihaoc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68837 --- Comment #5 from HaoChen Gui --- I think there are two ways avoiding sign extension for offset loading. a. Make sure all offsets be positive. There exists backward jumps as well as STC will reorder the basic block. So the offset might be neg

[Bug target/68837] PowerPC switch statement performance

2020-06-04 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68837 --- Comment #4 from Segher Boessenkool --- On Power9 the lwa insn is cracked into an lwz and an extsw, just like on older CPUs. Cracked instructions have fewer constraints on p9 than they did on most older CPUs though (it doesn't have to be firs

[Bug target/68837] PowerPC switch statement performance

2020-06-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68837 --- Comment #3 from David Edelsohn --- The PR was from 2015, before Martin's improvements. Also, sign-extend load instructions were less efficient at the time. We need to re-examine the sequence on more recent microarchitectures.

[Bug target/68837] PowerPC switch statement performance

2020-06-03 Thread guihaoc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68837 HaoChen Gui changed: What|Removed |Added CC||guihaoc at gcc dot gnu.org --- Comment #2

[Bug target/68837] PowerPC switch statement performance

2015-12-10 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68837 David Edelsohn changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|