[PATCH] D108782: [MergeICmps] Ignore clobbering instructions before the loads

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 23:15:52 PDT 2021


pcc added a comment.

Looks like this change caused this crash, can you please take a look?

  $ cat test.ii
  class a {
  public:
    enum b {};
    struct c {
      b j;
      int *d;
      void *e;
    };
  };
  class f {
    bool operator==(const f &) const;
    a::c g() const;
  };
  bool f::operator==(const f &) const {
    a::c h = g(), i = g();
    return h.e == i.e && h.d == i.d && h.j == i.j;
  }
  $ clang++ -c  -o test.o test.ii -O2
  Instruction does not dominate all uses!
    %h = alloca %"struct.a::c", align 8
    %1 = bitcast %"struct.a::c"* %h to i32*
  Instruction does not dominate all uses!
    %i = alloca %"struct.a::c", align 8
    %2 = bitcast %"struct.a::c"* %i to i32*
  Instruction does not dominate all uses!
    %i = alloca %"struct.a::c", align 8
    %18 = bitcast %"struct.a::c"* %i to i8*
  Instruction does not dominate all uses!
    %h = alloca %"struct.a::c", align 8
    %19 = bitcast %"struct.a::c"* %h to i8*
  in function _ZNK1feqERKS_
  fatal error: error in backend: Broken function found, compilation aborted!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108782



More information about the llvm-commits mailing list