<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Aug 20, 2015, at 4:36 PM, Ahmed Bougacha via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="line-height:normal" class="">On Thu, Aug 20, 2015 at 4:33 PM, Matthias Braun via llvm-commits </span><span dir="ltr" style="line-height:normal" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span><span style="line-height:normal" class=""> wrote:</span><br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: matze<br class="">
Date: Thu Aug 20 18:33:31 2015<br class="">
New Revision: 245640<br class="">
<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D245640-26view-3Drev&d=BQMFaQ&c=eEvniauFctOgLOKGJOplqw&r=owCLIXjMdMpT1E9Ei7smWg&m=SwPFYUtzb34zudHl7guM4kicNsYswquFqXuwto7qp2I&s=HFGffUF9Csqwpja2-BCe38jqCCyA6ZBAaTRVc1IrrLg&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=245640&view=rev</a><br class="">
Log:<br class="">
AArch64: Do not create CCMP on multiple users.<br class="">
<br class="">
Create CMP;CCMP sequences from and/or trees does not gain us anything if<br class="">
the and/or tree is materialized to a GP register anyway. While most of<br class="">
the code already checked for hasOneUse() there was one important case<br class="">
missing.<br class="">
<br class="">
Modified:<br class="">
llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp<br class="">
llvm/trunk/test/CodeGen/AArch64/arm64-ccmp.ll<br class="">
<br class="">
Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_AArch64_AArch64ISelLowering.cpp-3Frev-3D245640-26r1-3D245639-26r2-3D245640-26view-3Ddiff&d=BQMFaQ&c=eEvniauFctOgLOKGJOplqw&r=owCLIXjMdMpT1E9Ei7smWg&m=SwPFYUtzb34zudHl7guM4kicNsYswquFqXuwto7qp2I&s=OKVifkuGhkUwmSgUhDG7bVH1MpwGJ-KO2FPbP9W0jIY&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp?rev=245640&r1=245639&r2=245640&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (original)<br class="">
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp Thu Aug 20 18:33:31 2015<br class="">
@@ -1349,7 +1349,7 @@ static SDValue emitConjunctionDisjunctio<br class="">
unsigned NZCV = AArch64CC::getNZCVToSatisfyCondCode(InvOutCC);<br class="">
return emitConditionalComparison(LHS, RHS, CC, CCOp, ConditionOp, NZCV, DL,<br class="">
DAG);<br class="">
- } else if (Opcode != ISD::AND && Opcode != ISD::OR)<br class="">
+ } else if ((Opcode != ISD::AND && Opcode != ISD::OR) || !Val->hasOneUse())<br class="">
return SDValue();<br class="">
<br class="">
assert((Opcode == ISD::OR || !PushNegate)<br class="">
<br class="">
Modified: llvm/trunk/test/CodeGen/AArch64/arm64-ccmp.ll<br class="">
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_AArch64_arm64-2Dccmp.ll-3Frev-3D245640-26r1-3D245639-26r2-3D245640-26view-3Ddiff&d=BQMFaQ&c=eEvniauFctOgLOKGJOplqw&r=owCLIXjMdMpT1E9Ei7smWg&m=SwPFYUtzb34zudHl7guM4kicNsYswquFqXuwto7qp2I&s=W4WVNP7X9HiTsBG7H-00HAJOO60OgHlTIp65kNG6bEQ&e=" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/arm64-ccmp.ll?rev=245640&r1=245639&r2=245640&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/test/CodeGen/AArch64/arm64-ccmp.ll (original)<br class="">
+++ llvm/trunk/test/CodeGen/AArch64/arm64-ccmp.ll Thu Aug 20 18:33:31 2015<br class="">
@@ -373,8 +373,8 @@ define i32 @select_ororand(i32 %w0, i32<br class="">
ret i32 %sel<br class="">
}<br class="">
<br class="">
-; CHECK-LABEL: select_noccmp<br class="">
-define i64 @select_noccmp(i64 %v1, i64 %v2, i64 %v3, i64 %r) {<br class="">
+; CHECK-LABEL: select_noccmp1<br class="">
+define i64 @select_noccmp1(i64 %v1, i64 %v2, i64 %v3, i64 %r) {<br class="">
; CHECK-NOT: CCMP<br class=""></blockquote><div class=""><br class=""></div><div class=""><span style="line-height:normal" class="">Should this be lowercase "ccmp" ?</span></div></div></div></div></div></blockquote>Indeed, thanks for spotting this. Should have double checked that. Turns out I even broke my own testcase while cleaning my code for submission. Fix is coming soon...</div><div><br class=""></div><div>- Matthias</div><div><br class=""></div></body></html>