[PATCH] D131073: [AArch64][GlobalISel] Recognise some CCMPri

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 11:43:39 PDT 2022


dmgreen added a comment.

> It turns out the mis-compile can also be reproduced by just bootstrapping LLVM with -O3 -fglobal-isel on AArch64 hardware. I reverted the change for now.

I've tested a bootstrap and it worked with the new code. Please let me know if anything else seems broken.



================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:4850
+      MIB.buildInstr(CCmpOpc, {}, {LHS});
+  if (C)
+    CCmp.addImm(C->Value.getZExtValue());
----------------
tschuett wrote:
> This condition is different from the one above? The  `C->Value.ult(32)` differs.
Yeah, that was pretty daft. It was intended to clear the C if it wasn't set to anything useful. I've changed it to a opcode check instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131073



More information about the llvm-commits mailing list