Hello,
This patch fixes PR4174. Two test-cases included: original one from bugzilla and a little bit complicated made be myself.
It seems that LoopIndexSplit doesn't handle some cases, I'll try to send some patch this week.
Regards
pr4174.patch (3.15 KB)
Hello,
This patch fixes PR4174. Two test-cases included: original one from bugzilla
and a little bit complicated made be myself.
I think you want isSafeToSpeculativelyExecute rather than
mayHaveSideEffects. Otherwise, looks fine.
It seems that LoopIndexSplit doesn't handle some cases, I'll try to send
some patch this week.
You mean like PR3913? Or are you referring to something else?
-Eli
Another two "hacks" are needed: for BranchInst and for IntrinsicInst.
Patch attached.
Regards
pr4174-2.patch (2.87 KB)
IntrinsicInst isn't necessarily safe...
-Eli
Without IntrinsicInst we break test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll.
-Jakub
Checking for isa<DbgInfoIntrinsic> is safe.
-Eli
Ah, right
Thanks for your help. I hope that everything is OK now.
New patch attached.
-Jakub
pr4174-3.patch (2.87 KB)
Looks fine, I think. I should probably consider some changes to
isSafeToSpeculativelyExecute, though...
That said, I'm not entirely sure how this is supposed to interact with
LoopIndexSplit::cleanBlock... I never really quite understood what
it's doing.
-Eli
Umm, make that "I'm not entirely sure whether you should be doing what
you're currently doing or using cleanBlock here".
-Eli