[PATCH] D81632: Fix undefined behavior in PeepholeOptimizer.

zuojian lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 02:41:31 PDT 2020


linzj added a comment.

> I think SubIdx is supposed to be set by TII->isCoalescableExtInstr(). If it's not doing that, then the error's probably in that call and not in this function.

Then most target instr infos need to patch.

>   A test case that shows the problem would also be good.

valgrind shows me this bug. I don't think any testcase is able to reproduce an expected value in this circumstance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81632





More information about the llvm-commits mailing list