[LLVMdev] "icmp eq", "icmp ne" not commuting operands on ARM

Evan Cheng evan.cheng at apple.com
Fri Jun 26 17:16:35 PDT 2009


David and I talked off line. He's going to fix it.

Evan

On Jun 26, 2009, at 4:25 PM, David Goodwin wrote:

> NE and EQ comparisons should be able to commute their operands. But,  
> for ARM at least, this does not seem to be happening. The first  
> sequence below generates CMN (compare negated) but the second does  
> not (complete test attached). These seem to map to ARMcmpNZ. Where  
> would I look to see if that is marked commutative?
>
>    %nb = sub i32 0, %b
>    %tmp = icmp ne i32 %a, %nb
>
>    %nb = sub i32 0, %b
>    %tmp = icmp ne i32 %nb, %a
>
> David
>
> <thumb2-cmn.ll>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list