[PATCH] D62695: [AArch64][GlobalISel] Optimize G_FCMP + G_SELECT pairs when G_SELECT is fp

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 12:03:05 PDT 2019


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: Petar.Avramovic, hiraditya, kristof.beyls, javed.absar, rovka.
Herald added a project: LLVM.

Instead of emitting all of the test stuff for a compare when it's only used by a select, instead, just emit the compare + select. The select will use the value of NZCV correctly, so we don't need to emit all of the test instructions etc.

For now, only support fp selects which use G_FCMP. Also only support condition codes which will only require one select to represent.

Also add a test.


https://reviews.llvm.org/D62695

Files:
  llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62695.202267.patch
Type: text/x-patch
Size: 17126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190530/64b8dc8d/attachment.bin>


More information about the llvm-commits mailing list