Fix SystemZ hang caused by r279105
authorElliot Colp <colpell@ca.ibm.com>
Tue, 23 Aug 2016 14:03:02 +0000 (14:03 +0000)
committerElliot Colp <colpell@ca.ibm.com>
Tue, 23 Aug 2016 14:03:02 +0000 (14:03 +0000)
commita4092104cb21ba98edf8ed48ce5640bb0725c406
tree25687e7f94247696dc62348674a42167d4c3b735
parentfc4430ea454aec7ca0071e847bc2b8882f1ccbec
Fix SystemZ hang caused by r279105

The change in r279105 causes an infinite loop in some cases, as it sets the upper bits of an AND mask constant, which DAGCombiner::SimplifyDemandedBits then unsets.
This patch reverts that part of the behaviour, instead relying on .td peepholes to perform the transformation to NILL. I reapplied my original fix for the problem addressed by r279105 (unsetting the upper bits, which prevents a compiler abort for a different reason).

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

llvm-svn: 279515
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZInstrInfo.td