Commit 3069557
Fix parsing of --spec-const option (#1630)
While running OpenCL-CTS SPIR-V subtests, i found that launching llvm-spirv with arguments:
-r --spec-const=101:i64:4609589727908835759
results in error message:
Error: Invalid value for '-spec-const' option! In "101:i64:4609589727908835759": can't convert "4609589727908835759" to 64-bit integer number
However, 4609589727908835759 fits into 64bits (0x3ff88d6f544bb1af). The problem seems to be that getNumWords() returns 2 so i changed it to use getActiveBits().
Original commit:
KhronosGroup/SPIRV-LLVM-Translator@11034771 parent f7b72c5 commit 3069557
File tree
2 files changed
+3
-3
lines changed- llvm-spirv
- test/transcoding
- tools/llvm-spirv
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
0 commit comments