Changes in commit d9ebaeeb468d6a8f29eb479f18d2790f7efb8565 cause the
compiler to enter an infinite loop.
This reverts commit d9ebaeeb468d6a8f29eb479f18d2790f7efb8565.
Paths
| Differential D93857
Revert "[InstCombine] Hoist xor-by-constant from xor-by-value" AbandonedPublic Authored by bgraur on Dec 28 2020, 5:13 AM.
Details
Summary Changes in commit d9ebaeeb468d6a8f29eb479f18d2790f7efb8565 cause the This reverts commit d9ebaeeb468d6a8f29eb479f18d2790f7efb8565.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 28 2020, 5:15 AM This revision now requires changes to proceed.Dec 28 2020, 5:17 AM Comment Actions @lebedev.ri: I'll need some time to localize and minimize a test for this. Is it OK for you to send you this later (this evening or tomorrow)? Comment Actions It would be best to have the reproducer beforehand. Comment Actions Here's a small repro: #include <cstdint> static int v; void foo(unsigned char x[2]) { x[0] = static_cast<unsigned char>(reinterpret_cast<uintptr_t>(&v)); x[1] = ~static_cast<unsigned char>(0); for (int i = 0; i < 2; i++) { unsigned char s0 = x[0]; unsigned char s1 = x[1]; s1 ^= s0; x[0] = s1 ^ (s1 << 1); x[1] = (s1 << 4) | (s1 >> 4); } } Comment Actions How about submitting this revert and you work on the fix separately? Comment Actions Thank you very much for the reproducer! Comment Actions Roman fixed forward the cause of the infinite loop.
Revision Contents
Diff 313847 llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/hoist-xor-by-constant-from-xor-by-value.ll
llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll
llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-vector.ll
llvm/test/Transforms/InstCombine/or-xor.ll
llvm/test/Transforms/InstCombine/unfold-masked-merge-with-const-mask-scalar.ll
llvm/test/Transforms/InstCombine/unfold-masked-merge-with-const-mask-vector.ll
llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
llvm/test/Transforms/InstCombine/vec_shuffle.ll
llvm/test/Transforms/InstCombine/xor2.ll
|