[PATCH] D71547: Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove"

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 11:25:54 PST 2020


aganea added a subscriber: hans.
aganea added a comment.

Reduced to:

  // a.cpp
  #include <vector>
  struct SP {
    void WeakAddRef();
    void WeakRelease();
  };
  template <typename T> struct PtrBase {
    T *volatile P;
    ~PtrBase() {
      if (R)
        R->WeakRelease();
    }
    PtrBase(const PtrBase &O) : R(O.R) {
      if (R)
        R->WeakAddRef();
    }
    SP *R;
    bool IsValid() const { return P != nullptr; }
  };
  struct alignas(16) VectorSIMD4f {
    float V;
  };
  unsigned __int64 countAF() {
    class AF {
      VectorSIMD4f B;
    };
    struct PD {
      PtrBase<AF> P;
    };
    std::vector<PD> AFs;
    unsigned __int64 C = 0;
    for (auto A : AFs) {
      if (A.P.IsValid())
        ++C;
    }
    return C;
  }

Build with:

  clang-cl a.cpp /c /O1

Please see the message just above for the cmake command to build clang.

This occurs in trunk and the 10.0 branch as well. @gchatelet Would you have a chance to take a look?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71547





More information about the llvm-commits mailing list