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

David Goodwin david_goodwin at apple.com
Fri Jun 26 16:25:14 PDT 2009


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: thumb2-cmn.ll
Type: application/octet-stream
Size: 526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090626/783a00c4/attachment.obj>
-------------- next part --------------



More information about the llvm-dev mailing list