Files
clang-p2996/llvm/test/Transforms/ConstantHoisting/ARM
Bjorn Pettersson 85eeba48a0 [ConstantHoisting] Add back ptr->ptr bitcast to avoid assertion failure
In commit a7ee80fab2 a ptr->ptr bitcast was removed. But that
seem to cause "Expected an cast instruction!" assertions later in
that pass. This patch will add back the bitcast again.

This was a bit unexpected since there is no bitcast added after
creating the Add instruction in the else clause, but I guess there
is something special with the GetElementPtr scenario which makes this
bitcast needed to avoid such asserts.

This patch is also adding a reproducer for
  https://github.com/llvm/llvm-project/issues/52689
that started to fail due to hitting the above mentioned assert. Now
it should end up hitting the assertion failure from #52689 again.
2023-08-14 11:13:13 +02:00
..