Page MenuHomePhabricator

[AArch64][GlobalISel] When generating SUBS for compares, don't write to wzr/xzr.
ClosedPublic

Authored by aemerson on Fri, May 22, 3:34 PM.

Details

Summary

Although writing to wzr/xzr is correct since we don't care about the result of the sub, only the flags, doing so causes tail merge blocks to fail.

Writing to an unused virtual register instead allows the optimization to fire, improving performance significantly on 256.bzip2.

Diff Detail

Event Timeline

aemerson created this revision.Fri, May 22, 3:34 PM
paquette added inline comments.Fri, May 22, 3:36 PM
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
3702

Can probably remove this

3705

Can probably remove this

aemerson updated this revision to Diff 265820.Fri, May 22, 5:18 PM

Deleted old lines.

This revision is now accepted and ready to land.Fri, May 22, 9:46 PM
This revision was automatically updated to reflect the committed changes.