Sometimes we can infer an align from an allocalign but the function
already promised it'd be more-aligned than the allocalign and there's an
existing align that we shouldn't reduce. Make sure we handle that
correctly.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/test/Transforms/InstCombine/InferAlignAttribute.ll | ||
---|---|---|
2 | We shouldn't be testing -O2 in InstCombine tests. |
llvm/test/Transforms/InstCombine/InferAlignAttribute.ll | ||
---|---|---|
37–39 | Please explicitly note that this is mildly undesirable (yet conservatively correct) behavior. We would prefer the result to have an align 128, if that were to happen. Also would be helpful to note that it is a simplified example of what happens in practice with _mm_malloc which calls posix_memalign. |
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
2843 | While you're here: This explicit removeRetAttr shouldn't be necessary. addRetAttr overwrites an existing attribute. |
While you're here: This explicit removeRetAttr shouldn't be necessary. addRetAttr overwrites an existing attribute.