This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Use emitTestBit in selection for G_BRCOND
ClosedPublic

Authored by paquette on Oct 1 2020, 1:55 PM.

Details

Summary

Partially refactoring, partially fixing a bug.

  • We shouldn't use TB(N)ZX unless the bit number is >= 32 (it has no encoding)
  • We can fold more than xor using emitTestBit

Also remove a check which isn't relevant anymore + update tests.

Rename select-brcond-of-not.mir to select-brcond-of-binop.mir, since it now tests more than just G_XOR.

Diff Detail

Event Timeline

paquette created this revision.Oct 1 2020, 1:55 PM
paquette requested review of this revision.Oct 1 2020, 1:55 PM
aemerson accepted this revision.Oct 1 2020, 3:17 PM
This revision is now accepted and ready to land.Oct 1 2020, 3:17 PM
llvm/test/CodeGen/AArch64/GlobalISel/select-brcond-of-binop.mir