[X86] Improved target combine rules for selecting horizontal add/sub.
[oota-llvm.git] / lib / Target / X86 / X86ISelDAGToDAG.cpp
index 03c9620db4a25ed1f7beaf3bb9b16de05e3d83ff..74386d33990ddacfdb15ca0536270608a78b1173 100644 (file)
@@ -162,6 +162,13 @@ namespace {
       return "X86 DAG->DAG Instruction Selection";
     }
 
+    bool runOnMachineFunction(MachineFunction &MF) override {
+      // Reset the subtarget each time through.
+      Subtarget = &TM.getSubtarget<X86Subtarget>();
+      SelectionDAGISel::runOnMachineFunction(MF);
+      return true;
+    }
+
     void EmitFunctionEntryCode() override;
 
     bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const override;