Issue |
90446
|
Summary |
Align attribute doesn't dereferenceability
|
Labels |
miscompilation,
llvm:instcombine
|
Assignees |
|
Reporter |
nunoplopes
|
InstCombine does the following propagation of align(32) in the function argument to the load.
However these `align` have different semantics. Align in load/store imply dereferenceability of the size rounded up to the alignment (per LangRef). Align in a function argument does not.
```llvm
define i32 @foo2(ptr align(32) %a) {
%#0 = load i32, ptr %a, align 4
ret i32 %#0
}
=>
define i32 @foo2(ptr align(32) %a) {
%#0 = load i32, ptr align(32) %a, align 32
ret i32 %#0
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target
Example:
ptr align(32) %a = pointer(non-local, block_id=1, offset=0)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs