[PATCH] D138508: [TargetLowering] Teach DemandedBits about VSCALE
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 03:16:51 PST 2022
uabelho added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1137
+ int64_t VScaleResultUpperbound =
+ *MaxVScale * Op.getConstantOperandAPInt(0).getSExtValue();
+ bool Negative = VScaleResultUpperbound < 0;
----------------
With an UBSan build we get this
```
../lib/CodeGen/SelectionDAG/TargetLowering.cpp:1137:20: runtime error: signed integer overflow: 16 * -9223372036854775808 cannot be represented in type 'long'
```
when running lit tests
```
Failed Tests (1):
LLVM :: CodeGen/AArch64/sve-gather-scatter-addr-opts.ll
```
I get it also on latest main (d2b070d3c95c5).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138508/new/
https://reviews.llvm.org/D138508
More information about the llvm-commits
mailing list