[PATCH] D74094: Reapply: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 13 15:49:50 PDT 2023
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
More information about the cfe-commits
mailing list