<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Good catch!<div><br></div><div>Committed with the comment change in <font face="Menlo"><span style="font-size: 11px;">r208641.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Thanks for the review Hal.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Pete<br></span></font><div><div>On May 12, 2014, at 3:38 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Peter,<br><br>Yep, this looks reasonable. Please also update the comment above SelectionDAGLegalize::LegalizeSetCCCondCode which currently reads (in part):<br><br>/// If the SETCC has been legalized using the inverse condcode, then LHS and<br>/// RHS will be unchanged, CC will set to the inverted condcode, and NeedInvert<br>/// will be set to true. The caller must invert the result of the SETCC with<br>/// SelectionDAG::getNOT() or take equivalent action to swap the effect of a<br>/// true/false result.<br><br>-Hal<br><br>----- Original Message -----<br><blockquote type="cite">From: "Pete Cooper" <<a href="mailto:peter_cooper@apple.com">peter_cooper@apple.com</a>><br>To: "llvm-commits" <<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>><br>Sent: Monday, May 12, 2014 5:25:14 PM<br>Subject: [PATCH] Legalize SetCC needs logical NOT<br><br><br><br>Hi all<br><br>Please review this patch to use a logical not when inverting a SetCC.<br><br>The problem is that if I have something like<br><br>i8 = setcc<br><br>then using an xor with 0xFF will give the wrong answer when the<br>boolean contents are ZeroOrOne.<br><br>Unfortunately I couldn’t find a single target which goes wrong here<br>so I can’t generate a test case. Putting ‘llvm_unreachable’ in here<br>just doesn’t hit, but hopefully its clear from the patch that<br>there’s an obvious issue.<br><br>Thanks,<br>Pete<br><br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br><br></blockquote><br>--<span class="Apple-converted-space"> </span><br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory</div></blockquote></div><br></div></body></html>