aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorPatryk Wychowaniec <pwychowaniec@pm.me>2023-07-19 11:54:34 +0800
committerBen Shi <2283975856@qq.com>2023-07-19 11:57:00 +0800
commit4e831753b9cf8745e9bf251f775f2399c9ef4138 (patch)
tree4d9c238ec51cbbc66cf21cb01b48cea0d14af3e6 /clang/tools/c-index-test/c-index-test.c
parenteb33db4f9151b3cb87a45d2135b9decc133f3d09 (diff)
downloadllvm-4e831753b9cf8745e9bf251f775f2399c9ef4138.zip
llvm-4e831753b9cf8745e9bf251f775f2399c9ef4138.tar.gz
llvm-4e831753b9cf8745e9bf251f775f2399c9ef4138.tar.bz2
[AVR] Expand shifts of all types except int8 and int16
Currently our AVRShiftExpand pass expands only 32-bit shifts, with the assumption that other kinds of shifts (e.g. 64-bit ones) are automatically reduced to 8-bit ones by LLVM during ISel. However this is not always true and causes problems in the rust-lang runtime. This commit changes the logic a bit, so that instead of expanding only 32-bit shifts, we expand shifts of all types except 8-bit and 16-bit. This is not the most optimal solution, because 64-bit shifts can be expanded to 32-bit shifts which has been deeply optimized. I've checked the generated code using rustc + simavr, and all shifts seem to behave correctly. Spotted in the wild in rustc: https://github.com/rust-lang/compiler-builtins/issues/523 https://github.com/rust-lang/rust/issues/112140 Reviewed By: benshi001 Differential Revision: https://reviews.llvm.org/D154785
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
0 files changed, 0 insertions, 0 deletions