Use getFixedValue instead of getKnownMinValue to convert TypeSize
to uint64_t. I believe this would have caught the bug fixed by
D157872.
To prevent false failures, I had to treat a scalable 0 as if it
is fixed value.
Paths
| Differential D158115
[SelectionDAG][RISCV][SVE] Harden fixed offset version of ComputeValueVTs against scalable offsets. ClosedPublic Authored by craig.topper on Aug 16 2023, 1:41 PM.
Details Summary Use getFixedValue instead of getKnownMinValue to convert TypeSize To prevent false failures, I had to treat a scalable 0 as if it
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Aug 21 2023, 5:56 AM This revision was landed with ongoing or failed builds.Aug 21 2023, 10:36 AM Closed by commit rGe620eac75e47: [SelectionDAG][RISCV][SVE] Harden fixed offset version of ComputeValueVTs… (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 552075 llvm/include/llvm/Support/TypeSize.h
llvm/lib/CodeGen/Analysis.cpp
|
A value of zero is both fixed and scalable compatible so I think perhaps this should just always be getFixedValue() and TypeSize should be updated to allow the scalable zero case to return 0.
I also think isFixed() and isScalable() should return true for the zero case but that can be a job for later.