<div dir="ltr"><div><div><div><div><div><div><div><div>Hello everyone,<br><br><br></div>Consider we have this following set of code: <br><br></div>int foo() {<br><br></div>int a,b;<br></div>a = __builtin_XX(0x11);<br></div>b = __builtin_XX(0x11);<br></div>return a+b;<br>}<br><br></div>The problem currently is that LLVM eliminated the second call and copied the result from the first call into a new set of registers. Is there is a way to force LLVM to generate two explicit calls to a builtin function. The builtin takes in an integer type, and also returns back an integer type:<br><br> def int_XX : GCCBuiltin<"__builtin_XX">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty]>;<br><br></div>Is there some flag that I'm missing? Your help will be really appreciated.<br><div><div><div><div><div><div><div><div><div><div><div><br><br><div class="gmail_signature">Best Regards,<br>Kumail Ahmed<br><br></div>
</div></div></div></div></div></div></div></div></div></div></div></div>