================
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const
Record *R,
} else if (Bounds->getName() == "IB_LaneIndex") {
IA.boundsType = ImmediateArg::BoundsType::ExplicitRange;
IA.i1 = 0;
- IA.i2 = 128 / Param->sizeInBits() - 1;
+ unsigned sizeInBits = Param->sizeInBits();
+ if (sizeInBits == 0)
+ PrintFatalError("Division by zero: Param->sizeInBits() is zero.");
----------------
AaronBallman wrote:
Oh! Good catch (and interesting to know)!
Regardless, this diagnostic is saying what the code is doing wrong, not what
the user of tablegen is doing wrong. The diagnostic should be written such that
it helps the developer figure out how to fix their code.
https://github.com/llvm/llvm-project/pull/115883
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits