Reverts llvm commit 42eaf4fe0adef3344adfd9fbccd49f325cb549ef, pointed from bisect as source of regression that causes liblzma to compress/uncompress incorrectly. It's know to affect powerpc64 BE only. The patch unbreaks FreeBSD powerpc64 installation media, since bsdinstall cannot uncompress the *.txz files produced by FreeBSD CI (data corruption). Reported to upstream in: https://bugs.llvm.org/show_bug.cgi?id=51714 MFC after: 2 days
- rG8a95c6332bfc: llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for…
rGd8199cf063f0: llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for…
rGf21fcae48702: llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for…
Let's do this for now to get the PowerPC builds working again. But also be aware that the bisected upstream commit is only exposing an underlying issue: most likely the root cause is in the PowerPC backend.
For this specific case Reames verified our PR in the upstream and noticied a bug in the original implementation . Chen Zheng decided to revert  the change on LLVM/main as well, so it looks safe for us do do the same.
The PR on upstream was marked as LLVM 12 and LLVM13 blocker candidates. I'll keep tracking the other issues.