X86: Add comment.
authorJim Grosbach <grosbach@apple.com>
Tue, 9 Jul 2013 02:07:28 +0000 (02:07 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 9 Jul 2013 02:07:28 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185900 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index b07928150f3d7dfbaa824a93a6e37a140b93f039..9465420ba90700df25b8bed6eaa66124b6256814 100644 (file)
@@ -2531,6 +2531,11 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {
 
     // Prevent use of AH in a REX instruction by referencing AX instead.
     // Shift it down 8 bits.
+    //
+    // The current assumption of the register allocator is that isel
+    // won't generate explicit references to the GPR8_NOREX registers. If
+    // the allocator and/or the backend get enhanced to be more robust in
+    // that regard, this can be, and should be, removed.
     if (HiReg == X86::AH && Subtarget->is64Bit() &&
         !SDValue(Node, 1).use_empty()) {
       SDValue Result = CurDAG->getCopyFromReg(CurDAG->getEntryNode(), dl,