[PATCH] D118663: [AArch64] Adds SUBS and ADDS instructions to the MIPeepholeOpt.

Micah Weston via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 13:45:05 PST 2022


red1bluelost updated this revision to Diff 408294.
red1bluelost added a comment.

Fixes issue found in ClangBuiltLinux.

Turns out a scenario was encountered where DstReg is physical which causes
`MRI->getRegClass(DstReg)` to have an assertion failure. This was verified with
a new test case based on the ClangBuiltLinux IR output.

As a solution, DstReg only constrains the new NewDstReg if DstReg is virtual.
The times where it isn't virtual is when the output is going to XZR or WZR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118663

Files:
  llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
  llvm/lib/Target/AArch64/AArch64InstrInfo.h
  llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
  llvm/test/CodeGen/AArch64/addsub.ll
  llvm/test/CodeGen/AArch64/arm64-instruction-mix-remarks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118663.408294.patch
Type: text/x-patch
Size: 21544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220213/d3641923/attachment.bin>


More information about the llvm-commits mailing list