[PATCH] D75840: [ExpandMemCmp] Improve non-equality comparisons with zero.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 07:03:12 PDT 2020


spatel added inline comments.


================
Comment at: llvm/test/Transforms/ExpandMemCmp/X86/memcmp.ll:455
 ; X64_1LD-NEXT:    [[TMP4:%.*]] = load i16, i16* [[TMP2]]
-; X64_1LD-NEXT:    [[TMP5:%.*]] = icmp ne i16 [[TMP3]], [[TMP4]]
+; X64_1LD-NEXT:    [[TMP5:%.*]] = icmp eq i16 [[TMP3]], [[TMP4]]
 ; X64_1LD-NEXT:    br i1 [[TMP5]], label [[RES_BLOCK:%.*]], label [[LOADBB1:%.*]]
----------------
Wait - this is another miscompile. Can we split the equality compare part of this into its own patch?

If the 1st load pair compares equal, we must check the 2nd load pair, not go to the result block.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75840





More information about the llvm-commits mailing list