I don't know much about this pass, but we need a stronger check on the memset length arg to avoid an assert. The current code was added with D59000.
The test is reduced from:
https://llvm.org/PR50910
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Rebased - I found another bug ( https://llvm.org/PR50888 ) near here and patched it with f14495dc75d7 .
Comment Actions
I suppose we could instead clamp to the maximal remaining alloca size,
but it's UB so it doesn't seem worth spending too much time on it.
Seems fine to me.