diff options
author | Craig Topper <craig.topper@sifive.com> | 2020-12-09 10:21:40 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2020-12-09 13:39:07 -0800 |
commit | 5ff5cf8e057782e3e648ecf5ccf1d9990b53ee90 (patch) | |
tree | 57addf2db064e757f241c139b0928c92520f0766 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | c8466a57310a0f10563e4a5a511e8c6386599cfe (diff) | |
download | llvm-5ff5cf8e057782e3e648ecf5ccf1d9990b53ee90.zip llvm-5ff5cf8e057782e3e648ecf5ccf1d9990b53ee90.tar.gz llvm-5ff5cf8e057782e3e648ecf5ccf1d9990b53ee90.tar.bz2 |
[X86] Use APInt::isSignedIntN instead of isIntN for 64-bit ANDs in X86DAGToDAGISel::IsProfitableToFold
Pretty sure we meant to be checking signed 32 immediates here
rather than unsigned 32 bit. I suspect I messed this up because
in MathExtras.h we have isIntN and isUIntN so isIntN differs in
signedness depending on whether you're using APInt or plain integers.
This fixes a case where we didn't fold a constant created
by shrinkAndImmediate. Since shrinkAndImmediate doesn't topologically
sort constants it creates, we can fail to convert the Constant
to a TargetConstant. This leads to very strange behavior later.
Fixes PR48458.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions