<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think the pattern makes sense for this instruction, but it isn’t triggered right now. The shuffle that could trigger it is lowered to two ISD::INSERT_SUBVECTOR and I didn’t see anything in the X86 backend that looks for that pattern to convert it to a X86ISD::VBROADCAST.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 11, 2015, at 11:20 AM, Craig Topper <<a href="mailto:craig.topper@gmail.com" class="">craig.topper@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; 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;" class="">The class you used here uses this pattern, does that make sense for this instruction? Should we have an empty pattern for this?<div class=""><br class=""></div><div class=""><span style="font-family: monospace; font-size: inherit; white-space: pre;" class=""> [(set RC:$dst, (VT (X86VBroadcast (ld_frag addr:$src))))]</span><br class=""></div></div><div class="gmail_extra" style="font-family: Helvetica; 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;"><br class=""><div class="gmail_quote">On Wed, Mar 11, 2015 at 11:06 AM, Juergen Ributzka<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:juergen@apple.com" target="_blank" class="">juergen@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">Yes. It generates now "vinsertf128<span style="white-space: pre-wrap;" class="">       </span>$1, %xmm0, %ymm0, %ymm0”, which doesn’t go through memory anymore.</div><div class=""><div class="h5"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2015, at 10:59 AM, Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank" class="">craig.topper@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">But when you removed it, it got replace with a shuffle right? What instruction does that shuffle generate in llvm?</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 11, 2015 at 10:50 AM, Juergen Ributzka<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:juergen@apple.com" target="_blank" class="">juergen@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">There has never been a shuffle pattern that used this instruction. The only way you would get this instruction was by specifying the intrinsic. I removed the intrinsic in r231182, because we (clang) are not generating it anymore.</div><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2015, at 10:42 AM, Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank" class="">craig.topper@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Does the backend not emit this instruction for the corresponding shuffle pattern?</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 11, 2015 at 10:29 AM, Juergen Ributzka<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:juergen@apple.com" target="_blank" class="">juergen@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Author: ributzka<br class="">Date: Wed Mar 11 12:29:03 2015<br class="">New Revision: 231945<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=231945&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=231945&view=rev</a><br class="">Log:<br class="">Add the "vbroadcasti128" instruction back.<br class=""><br class="">This is a follow-up to r231182. This adds the "vbroadcasti128" instruction<br class="">back, but without the intrinsic mapping. Also add a test to check the<br class="">instriction encoding.<br class=""><br class="">This is related to<span class="Apple-converted-space"> </span><a class="">rdar://problem/18742778</a>.<br class=""><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/lib/Target/X86/X86InstrSSE.td<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/test/MC/X86/x86_64-avx-encoding.s<br class=""><br class="">Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=231945&r1=231944&r2=231945&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=231945&r1=231944&r2=231945&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)<br class="">+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Mar 11 12:29:03 2015<br class="">@@ -7833,6 +7833,11 @@ def VBROADCASTSDYrr  : avx2_broadcast_re<br class="">                                       int_x86_avx2_vbroadcast_sd_pd_256,<br class="">                                       WriteFShuffle256>, VEX_L;<br class=""><br class="">+let Predicates = [HasAVX2] in<br class="">+def VBROADCASTI128 : avx_broadcast_no_int<0x5A, "vbroadcasti128", VR256,<br class="">+                                          i128mem, v4i64, loadv2i64,<br class="">+                                          WriteLoad>, VEX_L;<br class="">+<br class=""> let Predicates = [HasAVX] in<br class=""> def : Pat<(int_x86_avx_vbroadcastf128_ps_256 addr:$src),<br class="">           (VBROADCASTF128 addr:$src)>;<br class=""><br class="">Modified: llvm/trunk/test/MC/X86/x86_64-avx-encoding.s<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_64-avx-encoding.s?rev=231945&r1=231944&r2=231945&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_64-avx-encoding.s?rev=231945&r1=231944&r2=231945&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/MC/X86/x86_64-avx-encoding.s (original)<br class="">+++ llvm/trunk/test/MC/X86/x86_64-avx-encoding.s Wed Mar 11 12:29:03 2015<br class="">@@ -3724,6 +3724,10 @@ vdivpd  -4(%rcx,%rbx,8), %xmm10, %xmm11<br class=""> // CHECK: encoding: [0xc4,0x63,0x2d,0x40,0x18,0x03]<br class="">           vdpps  $3, (%rax), %ymm10, %ymm11<br class=""><br class="">+// CHECK: vbroadcasti128  (%rax), %ymm12<br class="">+// CHECK: encoding: [0xc4,0x62,0x7d,0x5a,0x20]<br class="">+          vbroadcasti128  (%rax), %ymm12<br class="">+<br class=""> // CHECK: vbroadcastf128  (%rax), %ymm12<br class=""> // CHECK: encoding: [0xc4,0x62,0x7d,0x1a,0x20]<br class="">           vbroadcastf128  (%rax), %ymm12<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="">~Craig</div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="">~Craig</div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature">~Craig</div></div></div></blockquote></div><br class=""></div></body></html>