Commit 255a99c
authored
[APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (llvm#80309)
This fixes all the places that hit the new assertion added in
llvm#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 3ae6b57 commit 255a99c
File tree
31 files changed
+103
-64
lines changed- clang
- include/clang/Sema
- lib
- AST/ByteCode
- 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
31 files changed
+103
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6755 | 6755 | | |
6756 | 6756 | | |
6757 | 6757 | | |
6758 | | - | |
| 6758 | + | |
6759 | 6759 | | |
6760 | 6760 | | |
6761 | 6761 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
2099 | 2099 | | |
2100 | 2100 | | |
2101 | 2101 | | |
2102 | | - | |
2103 | | - | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
2104 | 2105 | | |
2105 | 2106 | | |
2106 | 2107 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
3598 | 3598 | | |
3599 | 3599 | | |
3600 | 3600 | | |
3601 | | - | |
| 3601 | + | |
3602 | 3602 | | |
3603 | | - | |
| 3603 | + | |
| 3604 | + | |
3604 | 3605 | | |
3605 | 3606 | | |
3606 | 3607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5697 | 5697 | | |
5698 | 5698 | | |
5699 | 5699 | | |
5700 | | - | |
| 5700 | + | |
| 5701 | + | |
| 5702 | + | |
5701 | 5703 | | |
5702 | 5704 | | |
5703 | 5705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
| 864 | + | |
863 | 865 | | |
864 | | - | |
865 | | - | |
866 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
867 | 869 | | |
868 | 870 | | |
869 | 871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
891 | | - | |
| 891 | + | |
| 892 | + | |
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
| |||
0 commit comments