--
What|Removed |Added
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23855
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-13
14:09 ---
Heh - you unswitched the comparison but not the jump!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23855
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-13
14:01 ---
On PPC, we get optimal and almost unswitched loop:
L4:
ble- cr4,L7
li r31,0
L6:
addi r31,r31,1
bl _bar
cmpw cr7,r30,r31
bne+ cr7,L6
L7:
addi r29,r29,1
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-13
13:47 ---
Well, it is the case that I have some numerical application that has
such loops and the case of small ie (1 or 2) does happen during boundary
updates, so instead of
if (ie <= 0)
return;
for (j=0; jh
--- Additional Comments From rakdver at gcc dot gnu dot org 2005-09-13
13:29 ---
It is not clear to me why you find the code without header copying better --
number of checks of each condition is exactly the same in both cases, and with
right ordering of basic blocks, there should be o
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-13
13:12 ---
Unswitching should clean this up, but unfortunately(?) only looks at innermost
loops. For a reason it seems, just removing this checks results in an ICE.
Testcase for unswitching:
void bar(void);
void foo(