Displaying 2 results from an estimated 2 matches for "xgh1e4".
2020 Nov 18
2
[AssumeBundles] ValueTracking cannot use alignment assumptions?
...w format. As an example, consider compilation of the following reproducer with clang-11 (old assume format) and clang-trunk (assume bundles):
#include <stdint.h>
int foo(int *p) {
__builtin_assume_aligned(p, 32);
return ((intptr_t) p) & 4;
}
clang-11 (https://godbolt.org/z/xGh1e4) computes the returned value statically:
ret i32 0
clang-trunk (https://godbolt.org/z/1jWe5j) fails to optimize the code:
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 4
ret i32 %5
As one can see, after switching to operand bundles, clang-trunk lost its abilit...
2020 Nov 18
0
[AssumeBundles] ValueTracking cannot use alignment assumptions?
...ilation of the following reproducer with clang-11 (old assume format) and clang-trunk (assume bundles):
>
> #include <stdint.h>
> int foo(int *p) {
> __builtin_assume_aligned(p, 32);
> return ((intptr_t) p) & 4;
> }
>
> clang-11 (https://godbolt.org/z/xGh1e4) computes the returned value statically:
>
> ret i32 0
>
> clang-trunk (https://godbolt.org/z/1jWe5j) fails to optimize the code:
>
> %3 = ptrtoint i32* %0 to i64
> %4 = trunc i64 %3 to i32
> %5 = and i32 %4, 4
> ret i32 %5
>
> As one can see, after switch...