[TargetLowering][ARM] Don't alter opaque constants in TargetLowering::ShrinkDemandedC...
authorCraig Topper <craig.topper@sifive.com>
Thu, 24 Jun 2021 16:08:57 +0000 (09:08 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 24 Jun 2021 17:09:36 +0000 (10:09 -0700)
commit03f9e04bc35c674337ec04d629260b4a283c1f25
treebfeeaf826a6efd373d3a484ccc0be1d01ca3fe98
parentaac4de989ee98605f1ce918c8e541c9be0f52324
[TargetLowering][ARM] Don't alter opaque constants in TargetLowering::ShrinkDemandedConstant.

We don't constant fold based on demanded bits elsewhere in
SimplifyDemandedBits, so I don't think we should shrink them either.

The affected ARM test changes because a constant become non-opaque
and eventually enabled some constant folding. This no longer happens.
I checked and InstCombine is able to simplify this test. I'm not sure exactly
what it was trying to test.

Reviewed By: lebedev.ri, dmgreen

Differential Revision: https://reviews.llvm.org/D104832
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/ARM/select-imm.ll