Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aa2e1c7

Browse filesBrowse files
committed
[DAGCombiner] Remove hasOneUse check from sext+sext_inreg to sext_inreg combine
The hasOneUseCheck does not really add anything and makes the combine too restrictive. Upcoming patches benefit from removing the hasOneUse check.
1 parent 4eec26b commit aa2e1c7
Copy full SHA for aa2e1c7

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Copy file name to clipboardExpand all lines: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14101,7 +14101,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
1410114101
}
1410214102

1410314103
// If the trunc wasn't legal, try to fold to (sext_inreg (anyext x))
14104-
if ((!LegalTypes || TLI.isTypeLegal(VT)) && N0.hasOneUse()) {
14104+
if (!LegalTypes || TLI.isTypeLegal(VT)) {
1410514105
SDValue ExtSrc = DAG.getAnyExtOrTrunc(N00, DL, VT);
1410614106
return DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, ExtSrc,
1410714107
N0->getOperand(1));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.