empty_knapsack

calCL ignoring 0x80000000 constant when adding?

Discussion created by empty_knapsack on Feb 20, 2009
Latest reply on Mar 18, 2009 by empty_knapsack
iadd reg,0x80000000 == nothing

I've AMD IL code that looks like:

dcl_literal l12,0x80000000,0x80000000,0x80000000,0x80000000

...
mov r45.x,l12.x

...
iadd r34.x,r34.x,r45.x

If constant for iadd == 0x80000000 then calCL just ignoring it. In compiled code there no ADD_INT instruction generated. When changing constant to anything else (like 0x7ffffff or 0x80000001) everything became OK.

I've started to think that I missed something in declaration of constant (signed/unsigned) but ixor r34.x,r34.x,r45.x working ok with correct XOR_INT instruction generated.

Is this calCL compiler/optimizer bug or am I missed something being not so familiar with AMD IL atm?

 

Outcomes