1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/CodeGen/Generic
Jessica Paquette 24794481f6 [MIParser] Ensure getHexUint doesn't produce APInts with a bitwidth of 0
If getHexUint reads in a hex 0, it will create an APInt with a value of 0.
The number of active bits on this APInt is used to calculate the bitwidth of
Result. The number of active bits is defined as an APInt's bitwidth - its
number of leading 0s. Since this APInt is 0, its bitwidth and number of leading
0s are equal.

Thus, Result is constructed with a bitwidth of 0, triggering an APInt assert.

This commit fixes that by checking if the APInt is equal to 0, and setting the
bitwidth to 32 if it is. Otherwise, it sets the bitwidth using getActiveBits.

This caused issues when compiling MIR files with successor probabilities. In
the case that a successor is tagged with a probability of 0, this assert would
fire on debug builds.

https://reviews.llvm.org/D37401

llvm-svn: 312387
2017-09-01 22:17:14 +00:00
..
2002-04-14-UnexpectedUnsignedType.ll
2002-04-16-StackFrameSizeAlignment.ll
2003-05-27-phifcmpd.ll
2003-05-27-useboolinotherbb.ll
2003-05-27-usefsubasbool.ll
2003-05-28-ManyArgs.ll
2003-05-30-BadFoldGEP.ll
2003-05-30-BadPreselectPhi.ll
2003-07-06-BadIntCmp.ll
2003-07-07-BadLongConst.ll
2003-07-08-BadCastToBool.ll
2003-07-29-BadConstSbyte.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
2004-05-09-LiveVarPartialRegister.ll
2005-01-18-SetUO-InfLoop.ll
2005-04-09-GlobalInPHI.ll
2005-10-18-ZeroSizeStackObject.ll
2005-10-21-longlonggtu.ll
2005-12-01-Crash.ll
2005-12-12-ExpandSextInreg.ll
2006-01-12-BadSetCCFold.ll
2006-01-18-InvalidBranchOpcodeAssert.ll
2006-02-12-InsertLibcall.ll
2006-03-01-dagcombineinfloop.ll
2006-04-26-SetCCAnd.ll
2006-04-28-Sign-extend-bool.ll
2006-05-06-GEP-Cast-Sink-Crash.ll
2006-06-12-LowerSwitchCrash.ll
2006-06-13-ComputeMaskedBitsCrash.ll
2006-06-28-SimplifySetCCCrash.ll
2006-07-03-schedulers.ll
2006-08-30-CoalescerCrash.ll
2006-09-02-LocalAllocCrash.ll
2006-09-06-SwitchLowering.ll
2006-10-27-CondFolding.ll
2006-10-29-Crash.ll
2006-11-20-DAGCombineCrash.ll
2007-01-15-LoadSelectCycle.ll
2007-02-25-invoke.ll
2007-04-08-MultipleFrameIndices.ll [AVR] XFAIL a set of failing CodeGen tests 2017-02-08 10:24:18 +00:00
2007-04-13-SwitchLowerBadPhi.ll
2007-04-17-lsr-crash.ll
2007-04-27-InlineAsm-X-Dest.ll
2007-04-27-LargeMemObject.ll
2007-04-30-LandingPadBranchFolding.ll
2007-05-03-EHTypeInfo.ll
2007-05-15-InfiniteRecursion.ll
2007-12-17-InvokeAsm.ll [AVR] XFAIL a set of failing CodeGen tests 2017-02-08 10:24:18 +00:00
2007-12-31-UnusedSelector.ll
2008-01-25-dag-combine-mul.ll
2008-01-30-LoadCrash.ll
2008-02-04-Ctlz.ll
2008-02-04-ExtractSubvector.ll
2008-02-20-MatchingMem.ll
2008-02-25-NegateZero.ll
2008-02-26-NegatableCrash.ll
2008-08-07-PtrToInt-SmallerInt.ll
2009-03-17-LSR-APInt.ll
2009-03-29-SoftFloatVectorExtract.ll
2009-04-10-SinkCrash.ll
2009-04-28-i128-cmp-crash.ll
2009-11-16-BadKillsCrash.ll
2010-07-27-DAGCombineCrash.ll
2010-11-04-BigByval.ll
2010-ZeroSizedArg.ll
2011-01-06-BigNumberCrash.ll
2011-07-07-ScheduleDAGCrash.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
2012-06-08-APIntCrash.ll
2013-03-20-APFloatCrash.ll
2014-02-05-OpaqueConstants.ll
add-with-overflow-24.ll
add-with-overflow-128.ll
add-with-overflow.ll
addr-label.ll
annotate.ll
APIntLoadStore.ll
APIntParam.ll
APIntSextParam.ll
APIntZextParam.ll
asm-large-immediate.ll
assume.ll
badarg6.ll
badCallArgLRLLVM.ll
badFoldGEP.ll
BasicInstrs.ll
bool-to-double.ll
builtin-expect.ll
call2-ret0.ll
call-ret0.ll
call-ret42.ll
call-void.ll
cast-fp.ll
cfi-sections.ll PR 31534: When emitting both DWARF unwind tables and debug information, 2017-01-05 20:55:28 +00:00
ConstantExprLowering.ll
constindices.ll
crash.ll
dag-combine-crash.ll
dbg_value.ll
div-neg-power-2.ll
donothing.ll
dont-remove-empty-preheader.ll Add missing test for the "Don't delete empty preheaders" added in r265397 2016-04-05 14:21:32 +00:00
edge-bundles-blockIDs.ll
empty-insertvalue.ll
empty-load-store.ll
empty-phi.ll
exception-handling.ll
expand-experimental-reductions.ll Add a late IR expansion pass for the experimental reduction intrinsics. 2017-05-10 09:42:49 +00:00
externally_available.ll Do not verify MachimeDominatorTree if it is not calculated 2017-03-02 12:00:10 +00:00
fastcall.ll
fneg-fabs.ll
ForceStackAlign.ll
fp_to_int.ll
fp-to-int-invalid.ll
fpowi-promote.ll
fwdtwice.ll
global-ret0.ll
hello.ll
i128-addsub.ll
i128-arith.ll
icmp-illegal.ll Remove an empty line in icmp-illegal.ll . NFC 2017-02-27 16:09:44 +00:00
inline-asm-mem-clobber.ll [AVR] XFAIL a set of failing CodeGen tests 2017-02-08 10:24:18 +00:00
inline-asm-special-strings.ll
intrinsics.ll Add -O0 support for @llvm.invariant.group.barrier by discarding it if it gets to ISel. 2016-11-07 16:47:20 +00:00
invalid-memcpy.ll
isunord.ll
lit.local.cfg
llc-start-stop.ll [TargetPassConfig] Feature generic options to setup start/stop-after/before 2017-07-31 18:24:07 +00:00
llvm-ct-intrinsics.ll
MachineBranchProb.ll [ARM] Try to re-enable MachineBranchProb.ll for ARM/AArch64 2017-04-05 16:27:11 +00:00
multiple-return-values-cross-block-with-invoke.ll [Hexagon] Unxfail passing tests 2017-04-13 16:05:35 +00:00
negintconst.ll
nested-select.ll
no-target.ll
opt-codegen-no-target-machine.ll [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
overflow.ll
overloaded-intrinsic-name.ll Only run the overloaded-intrinsic-name.ll test once, with FileCheck. 2017-03-01 01:56:41 +00:00
PBQP.ll
pr2625.ll
pr3288.ll
pr12507.ll
pr24662.ll Fix constant folding of fp2int to large integers 2017-03-19 16:50:25 +00:00
pr33094.ll Handle ConstantExpr correctly in SelectionDAGBuilder 2017-07-09 16:01:04 +00:00
print-add.ll
print-after.ll
print-arith-fp.ll
print-arith-int.ll
print-int.ll
print-machineinstrs.ll [SystemZ] Fix trap issue and enable expensive checks. 2017-06-23 14:30:46 +00:00
print-mul-exp.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
print-mul.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
print-shift.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
ptr-annotate.ll
ret0.ll
ret42.ll
select-cc.ll [Hexagon] Unxfail passing tests 2017-04-13 16:05:35 +00:00
select.ll
shift-int64.ll
stacksave-restore.ll
storetrunc-fp.ll
switch-lower-feature.ll
switch-lower.ll
trap.ll
undef-phi.ll
v-split.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
vector-casts.ll
vector-constantexpr.ll
vector-identity-shuffle.ll
vector-redux.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
vector.ll [AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests 2017-07-16 23:33:50 +00:00
zero-probability.mir [MIParser] Ensure getHexUint doesn't produce APInts with a bitwidth of 0 2017-09-01 22:17:14 +00:00
zero-sized-array.ll