-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation
Description
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.
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)
Metadata
Metadata
Assignees
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation