nickdesaulniers added a comment.

In D74094#4643653 <https://reviews.llvm.org/D74094#4643653>, @nickdesaulniers 
wrote:

> With this change re-applied (`b7f4915644844fb9f32e8763922a070f5fe4fd29` 
> reverted), a.out runs without issue.   So yes, I need something other than a 
> godbolt link which uses clang-trunk which isn't stable after a revert to 
> understand what they are talking about.

Slight update here, I'm still working on this (slowly), but I now have a 
reproducer in hand.

  // clang++ foo.cpp -I eigen -fsanitize=address  -std=c++17 -O3 -march=haswell
  
  #include <unsupported/Eigen/CXX11/Tensor>
  
  using Tensor = Eigen::TensorFixedSize<float, Eigen::Sizes<2, 2>, 
Eigen::RowMajor, Eigen::DenseIndex>;
  
  auto round (Tensor m) {
      return (m + 0.5f).cast<int>().cast<float>();
  }
  
  int main() {
    Tensor a;
    a.setValues({{1, 2}, {3, 4}});
  
    const Tensor t3 = round(a.log().exp());
    return t3(0, 0);
  }

with eigen <https://gitlab.com/libeigen/eigen> @ 8f858a4ea810, and llvm @ 
102715a60ee4 
<https://reviews.llvm.org/rG102715a60ee45d04b5ba687a8728acd21e61494a> with 
b7f491564484 
<https://reviews.llvm.org/rGb7f4915644844fb9f32e8763922a070f5fe4fd29> reverted 
(i.e. this commit re-applied a second time).

I don't yet fully comprehend yet what's going wrong, and probably need to 
familiarize myself with the language rules around `auto`'s type deduction.

This can probably be reduced further as well; I'll try to preprocess it and run 
it through `cvise` to see if we can get something even more concise.

I'll also check the codegen differences from removing `null` `-fsanitize=` 
option (and perhaps `-march=haswell`, though I'd guess eigen is doing something 
with that deep inside).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74094

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to