OSDN Git Service

[SelectionDAG] reset NewNodesMustHaveLegalTypes flag between basic blocks
authorGuy Blank <guy.blank@intel.com>
Mon, 7 Aug 2017 05:51:14 +0000 (05:51 +0000)
committerGuy Blank <guy.blank@intel.com>
Mon, 7 Aug 2017 05:51:14 +0000 (05:51 +0000)
commitab13f9b93860fe1a6ad26c3d10a02ad6606f2ddc
tree70a90be7627f649537b09b52ef92090e974ad958
parent14cde8c19322aa0058391d1ade0e4d8ad4bb8aff
[SelectionDAG] reset NewNodesMustHaveLegalTypes flag between basic blocks

The NewNodesMustHaveLegalTypes flag is set to false at the beginning of CodeGenAndEmitDAG, and set to true after legalizing types.
But before calling CodeGenAndEmitDAG we build the DAG for the basic block.
So for the first basic block NewNodesMustHaveLegalTypes would be 'false' during the SDAG building, and for all other basic blocks it would be 'true'.

This patch sets the flag to false before SDAG building each basic block.

Differential Revision:
https://reviews.llvm.org/D33435

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310239 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
test/CodeGen/AArch64/fold-constants.ll