mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Make ComputeDemandedBits return a deterministic result when computing an AssertZext value.
In the added testcase the constant 55 was behind an AssertZext of type i1, and ComputeDemandedBits reported that some of the bits were both known to be one and known to be zero. Together with Michael Kuperstein <michael.m.kuperstein@intel.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160305 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b1162b8d4b
commit
7ee0e5ae60
@ -1965,6 +1965,7 @@ void SelectionDAG::ComputeMaskedBits(SDValue Op, APInt &KnownZero,
|
||||
APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits());
|
||||
ComputeMaskedBits(Op.getOperand(0), KnownZero, KnownOne, Depth+1);
|
||||
KnownZero |= (~InMask);
|
||||
KnownOne &= (~KnownZero);
|
||||
return;
|
||||
}
|
||||
case ISD::FGETSIGN:
|
||||
|
12
test/CodeGen/X86/2012-07-16-fp2ui-i1.ll
Normal file
12
test/CodeGen/X86/2012-07-16-fp2ui-i1.ll
Normal file
@ -0,0 +1,12 @@
|
||||
; RUN: llc < %s -march=x86-64 -mcpu=corei7
|
||||
|
||||
define void @autogen_SD3100() {
|
||||
BB:
|
||||
%FC123 = fptoui float 0x40693F5D00000000 to i1
|
||||
br i1 %FC123, label %V, label %W
|
||||
|
||||
V:
|
||||
ret void
|
||||
W:
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user