[PATCH] D78769: [AArch64][GlobalISel] Select immediate forms of compares by wiggling constants

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 16:16:51 PDT 2020


paquette updated this revision to Diff 260016.
paquette added a comment.

Fix a bug I missed and refactor a bit. Also add testcases that cover the bug.

Issue was that we need to make sure that anything that uses `emitIntegerCompare` recognizes that it may change the predicate. Otherwise, we'll end up using the old predicate in, say, a conditional branch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78769/new/

https://reviews.llvm.org/D78769

Files:
  llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
  llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78769.260016.patch
Type: text/x-patch
Size: 36639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/22eb31de/attachment.bin>


More information about the llvm-commits mailing list