<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139806>139806</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[missed optimization] pushq/popq preamble with -fomit-frame-pointer if __builtin_frame_address is called
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chrooti
</td>
</tr>
</table>
<pre>
Not much to add on the tile. It seems that adding a call __builtin_frame_address inside a function also triggers the pushq/popq preamble even if -fomit-frame-pointer is passed. Which means that pushq is pushing garbage values on the stack.
repro: https://godbolt.org/z/zsa5Mnsa9
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0kkGPmzAQhX-NuYyCwEAIBw6pVkg9tNceowEmeFqDWc-QVffXV6BUlSrlYPkw9vN77zOK8LQQtab6Yqq3BDd1IbaDiyEoJ30Yf7ffg8K8DQ40AI4jhAXUESh7SuGrghDNAupQ9zEvEyAM6D3cbv3GXnm53SPOdMNxjCQCvAiPBAj3bRmUwwLoJYBGniaKcqivm7h3Y7s1rO-wRsK59wT0oAX4Dqd7mFlPh-xpDbwoRWCBFUVoTOGH48HBTLg8jR1yx4lN3G5xwtjjRPBAv5H8zSSKw6_UZFeTXSOtMZjiCk51FVNcje2M7aYw9sFrGuJkbPe5L8Hq2yLYJGNbjE3RYEJtXpd1XtelPSeuvZzt0F_yqs6xbi7DMFzIlk1ZZkVT4Fhjwq3NbJVVeWGLrCjPKVJz7suqphqpyG1uyoxmZJ96_5j3txMW2ajNi-aSnROPPXk5IFq70AccU2PtzjS2-6VTv01iysyzqPyTUVZ_0J95rw7CqjzzJ-5YTPX2gsMHq3sB4f4auxzfgsZki779r1VWt_XpEGZju93cczutMfykQY3tjkhibPfM_GjtnwAAAP__74vuJw">