[PATCH] D51756: [AArch64] Commute comparisons when it would allow folding.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 15:28:44 PDT 2018


efriedma created this revision.
efriedma added reviewers: greened, SjoerdMeijer, t.p.northover, mcrosier.
Herald added a reviewer: javed.absar.
Herald added a subscriber: kristof.beyls.

Currently, whether we fold a shift or extension operation into a compare depends on whether the foldable operand happens to land on the RHS. Fix it so we consistently put foldable operations on the RHS.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38751


Repository:
  rL LLVM

https://reviews.llvm.org/D51756

Files:
  lib/Target/AArch64/AArch64ISelLowering.cpp
  test/CodeGen/AArch64/cmp-commute.ll
  test/CodeGen/AArch64/lack-of-signed-truncation-check.ll
  test/CodeGen/AArch64/signed-truncation-check.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51756.164297.patch
Type: text/x-patch
Size: 14094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/d7a4ab4b/attachment.bin>


More information about the llvm-commits mailing list