[llvm] e1cbfec - [X86] Add flag result VT to a MOV32r0 created in X86DAGToDAGISel::Select

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 9 13:33:40 PST 2020


Author: Craig Topper
Date: 2020-02-09T13:19:21-08:00
New Revision: e1cbfecdb866211a8f4f51064e96c200b278232b

URL: https://github.com/llvm/llvm-project/commit/e1cbfecdb866211a8f4f51064e96c200b278232b
DIFF: https://github.com/llvm/llvm-project/commit/e1cbfecdb866211a8f4f51064e96c200b278232b.diff

LOG: [X86] Add flag result VT to a MOV32r0 created in X86DAGToDAGISel::Select

The flag isn't used, but I believe this matches the MOV32r0 that
would be created by the table emitter. This should allow this node
to be CSEed with any others created by the table.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 98a1b04103f9..9789ffcd0dd5 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -4946,8 +4946,9 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
           SDValue(CurDAG->getMachineNode(SExtOpcode, dl, MVT::Glue, InFlag),0);
       } else {
         // Zero out the high part, effectively zero extending the input.
+        SDVTList VTs = CurDAG->getVTList(MVT::i32, MVT::i32);
         SDValue ClrNode =
-            SDValue(CurDAG->getMachineNode(X86::MOV32r0, dl, MVT::i32), 0);
+            SDValue(CurDAG->getMachineNode(X86::MOV32r0, dl, VTs, None), 0);
         switch (NVT.SimpleTy) {
         case MVT::i16:
           ClrNode =


        


More information about the llvm-commits mailing list