Closed gogo2 closed 1 year ago
https://github.com/triSYCL/sycl/pull/207 should fix this issue.
explanation of the bug: LLVM loves making anything it can into a memset but memset are handled poorly by the HLS backend. so our passes will turn memset back into stores of constants. there was a bug in generation of constant that need to be stored. it doesn't happened for {0, 1} because it cannot be turned into a memset.
This fix does the job for this issue, many thanks for help!
Problem description
When I try to compile such code:
it fails with a opt crash in sycl->HLS conversion step ("Error in sycl->HLS conversion").
It works if I disable aggregate initialization by defining construstor
Line(float s, float i) : slope{s}, intercept{i} {}
or using default member initializerfloat intercept = 0
.But the interesting thing is that it also works if pass something other than zeros to aggregate:
I believe this also affects
std::array
.Any chance for fixing this issue or at least some hint on where to look?
Setup