[llvm-dev] Does anyone know a workaround for this branching bug I hit?

Levo DeLellis via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 27 00:13:40 PDT 2020

I believe you all can access the test file and the diff in my bug report

In short, I'm experimenting with optimization and wrote branchless code -O2
generates a jump instruction causing my loop to be twice as slow. I changed
the jne+movl to cmove and my loop seems to take half as long.

I'm a little worried that this will interfere with other optimizations I
make in the same function (bug report is a small reproduce). Is there a
temporary workaround I can use? I'm thinking no and that I would have to
suck it up. But I seen stranger things so I thought I'd ask. I guess for
now I'll experiment allowing the slow jumps and I'll hand change it once
I'm done optimizing that function
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200427/0b094639/attachment.html>

More information about the llvm-dev mailing list