[PATCH] Legalize SetCC needs logical NOT

Pete Cooper peter_cooper at apple.com
Mon May 12 15:25:14 PDT 2014


Hi all

Please review this patch to use a logical not when inverting a SetCC.

The problem is that if I have something like

i8 = setcc

then using an xor with 0xFF will give the wrong answer when the boolean contents are ZeroOrOne.

Unfortunately I couldn’t find a single target which goes wrong here so I can’t generate a test case.  Putting ‘llvm_unreachable’ in here just doesn’t hit, but hopefully its clear from the patch that there’s an obvious issue.

Thanks,
Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not.diff
Type: application/octet-stream
Size: 2345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140512/888edb06/attachment.obj>


More information about the llvm-commits mailing list