http://llvm.org/bugs/show_bug.cgi?id=10987
Summary: Optimizer reduces well-defined load to undef in some
situations
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
See https://gist.github.com/1235034 for reproduction instructions.
In a very specific situation (a store to the same alloca in multiple branches
(which is optimized to a phi) with at least one of those branches doing an
invoke call with a non-trivial unwind sequence, which takes an output pointer
that is subsequently loaded and used for aforementioned store), a load that, as
far as I can see, is perfectly safe, is removed and replaced by an undef value.
I've seen a similar issue where the load is moved above the call in the output,
but still present. That might be what's happening here too -- first the load is
moved to before the call, at which point the alloca being loaded is
uninitialized, which would make replacing it with undef a valid decision.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs