If getHexUint reads in a 0 in hex, it will create an APInt A with a value of 0. It will then use that APInt to populate Result. It calculates the bitwidth of Result using A.getActiveBits(). This function returns the bitwidth of A - the number of leading zeroes in A.
A is 0, so all of its bits are leading 0s. Thus, we try to construct Result with a bitwidth of 0, hitting an assert.
This appeared originally by compiling test-suite/SingleSource/Benchmarks/Misc/mandel.c like so:
clang -Oz -mno-red-zone -S -emit-llvm test-suite/SingleSource/Benchmarks/Misc/mandel.c -o /tmp/mandel.ll
llc -march=aarch64 -stop-after=patchable-function /tmp/mandel.ll -o /tmp/mandel.mir
llc -march=aarch64 /tmp/mandel.mir
If you have asserts enabled, this blows up because of a successor basic block being tagged with a probability of 0.