diff options
| author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-01-03 16:01:16 +0300 |
|---|---|---|
| committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-01-03 17:55:46 +0300 |
| commit | 86403c0ff8930e6d4d21d94baa7384e54620f4cf (patch) | |
| tree | 1c7ff062ffac1b7ea3fbf5e737237e20a37ada7c /clang/test/Preprocessor/assembler-with-cpp.c | |
| parent | d09ac032ee0012d11ae9f9d717eaa6a10cc22a75 (diff) | |
| download | bcm5719-llvm-86403c0ff8930e6d4d21d94baa7384e54620f4cf.tar.gz bcm5719-llvm-86403c0ff8930e6d4d21d94baa7384e54620f4cf.zip | |
[DAGCombiner] `~(add X, -1)` -> `neg X` fold
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)'
added in 8dab0a4a7d691f2704f1079538e0ef29548db159
is too specific. It should just be 'A - (A & B)' -> 'A & (~B)',
but we currently fail to sink that '~' into `(B - 1)`.
Name: ~(X - 1) -> (0 - X)
%o = add i32 %X, -1
%r = xor i32 %o, -1
=>
%r = sub i32 0, %X
https://rise4fun.com/Alive/rjU
Diffstat (limited to 'clang/test/Preprocessor/assembler-with-cpp.c')
0 files changed, 0 insertions, 0 deletions

