[LLVMdev] interesting possible compiler bug

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Oct 15 14:28:40 PDT 2012


On 10/1/2012 9:40 PM, Nick Lewycky wrote:
>
> As far as I know, this optimization is legal.

It's not legal.
1. malloc is not known to always return a non-null pointer.
2. malloc has side-effects and hence cannot be eliminated.

-K

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list