[PATCH] D56587: Fix sign/zero extension in Dwarf expressions.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 08:13:13 PST 2019
aprantl added inline comments.
================
Comment at: lib/Transforms/Utils/Local.cpp:1854
+ if (Signed) {
+ // Sign extend To to FromBits
+ // (((To >> (ToBits - 1)) * (~0)) << ToBits) | To
----------------
nit: `.` at the end.
================
Comment at: lib/Transforms/Utils/Local.cpp:1855
+ // Sign extend To to FromBits
+ // (((To >> (ToBits - 1)) * (~0)) << ToBits) | To
+ SmallVector<uint64_t, 11> Ops({dwarf::DW_OP_dup,
----------------
I haven't had any coffee yet, but shouldn't that be `FromBits` and From ?:
```
00001110 >> 4-1 * ~0 << 4 | 00001110
1 * ~0 << 4 | 00001110
11111111 << 4 | 00001110
11110000 | 00001110
11111110
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56587/new/
https://reviews.llvm.org/D56587
More information about the llvm-commits
mailing list