diff options
author | Nikita Popov <npopov@redhat.com> | 2025-01-07 12:10:44 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2025-01-07 12:13:19 +0100 |
commit | 63d4e0fb66b75dd1c60acaa81ff8f8a4327cffcc (patch) | |
tree | 75b4eac20a8933875ea79ad09f3f066f363f14e5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4a42658c1be47ea8cb6f26f7cb1d1aed258845fe (diff) | |
download | llvm-63d4e0fb66b75dd1c60acaa81ff8f8a4327cffcc.zip llvm-63d4e0fb66b75dd1c60acaa81ff8f8a4327cffcc.tar.gz llvm-63d4e0fb66b75dd1c60acaa81ff8f8a4327cffcc.tar.bz2 |
[InstCombine] Compute result directly on APInts
If the bitwidth is 2 and we add two 1s, the result may overflow.
This is fine in terms of correctness, but triggers the APInt ctor
assertion. Fix this by performing the calculation directly on APInts.
Fixes the issue reported in:
https://github.com/llvm/llvm-project/pull/114539#issuecomment-2574845003
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions