[PATCH] D141188: [MergeICmps] Adapt to non-eq comparisons

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 18:14:59 PDT 2023


Allen added a comment.

Thanks for your report , I think the miscompile is related to  the splitting of ne-compare-chain.
In fact, it should not be splittted, I mistake this because the  alive2 accept the transform, https://alive2.llvm.org/ce/z/iKMekA.
The above transform is invalid as I missing place the related **target datalayout** information.

  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
  target triple = "aarch64-unknown-linux-gnu"



  class O {
    ...
  
    bool EqualsTo(const O &other) const {
      return first_ == other.first_ && type_ == other.type_
        && second_ == other.second_;
    }
  
   private:
    int type_ = 0;  // Discontinuous layout
    long first_;
    long second_;
  };


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

https://reviews.llvm.org/D141188



More information about the llvm-commits mailing list