[PATCH] D132102: [DirectX] Fix crash on ShuffleVectorInst in DXILBitcodeWriter
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 07:56:12 PDT 2022
kuhar added inline comments.
================
Comment at: llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp:2454
+ unsigned AlignRecord = Log2_32(AI.getAlign().value()) + 1;
+ assert(Log2_32(Value::MaximumAlignment) + 1 < 1 << 5 &&
+ "not enough bits for maximum alignment");
----------------
FYI, this produces compiler warnings for me:
```
/usr/local/google/home/kubak/llvm/llvm-project/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp:2454:20: warning: implicit conversion from 'const uint
64_t' (aka 'const unsigned long') to 'uint32_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion]
assert(Log2_32(Value::MaximumAlignment) + 1 < 1 << 5 &&
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
1 warning generated.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132102/new/
https://reviews.llvm.org/D132102
More information about the llvm-commits
mailing list