fix #7197, backport a fix to SimplifyDemandedUseBits in LLVM