Commit b207a0b
[APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (#80309)
This fixes all the places that hit the new assertion added in
llvm/llvm-project#106524 in tests. That is,
cases where the value passed to the APInt constructor is not an N-bit
signed/unsigned integer, where N is the bit width and signedness is
determined by the isSigned flag.
The fixes either set the correct value for isSigned, set the
implicitTrunc flag, or perform more calculations inside APInt.
Note that the assertion is currently still disabled by default, so this
patch is mostly NFC.1 parent c97aade commit b207a0b
File tree
30 files changed
+101
-63
lines changed- clang
- include/clang/Sema
- lib
- AST/Interp
- CodeGen
- Parse
- Sema
- lldb/source/Expression
- llvm
- include/llvm/ADT
- lib
- Analysis
- Bitcode/Reader
- CodeGen/SelectionDAG
- ExecutionEngine/MCJIT
- IR
- Target
- AArch64
- AMDGPU
- ARM/AsmParser
- Hexagon
- RISCV
- X86
- Transforms
- IPO
- Utils
- unittests/ADT
30 files changed
+101
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6792 | 6792 | | |
6793 | 6793 | | |
6794 | 6794 | | |
6795 | | - | |
| 6795 | + | |
6796 | 6796 | | |
6797 | 6797 | | |
6798 | 6798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
2104 | | - | |
2105 | | - | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
2106 | 2107 | | |
2107 | 2108 | | |
2108 | 2109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | | - | |
441 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3575 | 3575 | | |
3576 | 3576 | | |
3577 | 3577 | | |
3578 | | - | |
| 3578 | + | |
3579 | 3579 | | |
3580 | | - | |
| 3580 | + | |
| 3581 | + | |
3581 | 3582 | | |
3582 | 3583 | | |
3583 | 3584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5712 | 5712 | | |
5713 | 5713 | | |
5714 | 5714 | | |
5715 | | - | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
5716 | 5718 | | |
5717 | 5719 | | |
5718 | 5720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| 862 | + | |
| 863 | + | |
862 | 864 | | |
863 | | - | |
864 | | - | |
865 | | - | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
866 | 868 | | |
867 | 869 | | |
868 | 870 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
892 | | - | |
| 892 | + | |
| 893 | + | |
893 | 894 | | |
894 | 895 | | |
895 | 896 | | |
| |||
0 commit comments