<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=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">This should be straightforward: an out-of-tree target has legal ZERO_EXTEND for a type which is not legal for AND, which causes breakage.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">—escha</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">===================================================================</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">--- lib/CodeGen/SelectionDAG/DAGCombiner.cpp<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 237549)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">+++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp<span class="Apple-tab-span" style="white-space:pre"> </span>(working copy)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">@@ -6100,6 +6100,7 @@</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">   // Fold (zext (and (trunc x), cst)) -> (and x, cst),</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">   // if either of the casts is not free.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">   if (N0.getOpcode() == ISD::AND &&</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">+      (!LegalOperations || TLI.isOperationLegal(ISD::AND, VT)) &&</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">       N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">       N0.getOperand(1).getOpcode() == ISD::Constant &&</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">       (!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(),</div></body></html>