[LLVMdev] How to prevent Dead-Code-Elimination pass removing pseudo-instructions ADJCALLSTACK(DOWN | UP)?

Marcello Maggioni marcello at codeplay.com
Wed Sep 4 03:11:04 PDT 2013

You should set them as using/defining your stack register with :

let Defs = [STACKREG], Uses = [STACKREG] in {


On 04/09/13 07:56, æšć‹‡ć‹‡ wrote:
> I use pseudo-instructions ADJCALLSTACK(DOWN | UP) to adjust call 
> stacks, and it works well with "-O0" option. However, 
> ADJCALLSTACK(DOWN | UP) are removed during codegen DCE pass under "-O2".

More information about the llvm-dev mailing list