[PATCH] D98564: [AArch64] Peephole rule to remove redundant cmp after cset.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 14 02:47:45 PDT 2021


nikic added a comment.

I'm seeing a miscompile due to this change, see https://bugs.llvm.org/show_bug.cgi?id=51476. I suspect this is because analyzeCompare() only distinguishes comparisons against zero (CmpValue==0) and non-zero (CmpValue==1), but not precisely which non-zero value is used, while this code assumes that CmpValue==1 is a comparison against exactly 1 and not some other non-zero value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98564



More information about the llvm-commits mailing list