zhijian lin
zhijian lin
The `PowerPC VSX FMA Mutation` pass convert `COPY` adjacent with `XSMADDADP ` instruction to a single instruction `XSMADDMDP` as the comment in the https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp#L90 ``` // %5 = COPY %9;...
The `Register Coalescer` pass will convert following IR ``` bb.1.for.body.preheader: ; predecessors: %bb.0 successors: %bb.2(0x80000000); %bb.2(100.00%) MTCTR8loop killed %0:g8rc, implicit-def dead $ctr8 %8:g8rc = LI8 0 %10:vsrc = XXSPLTIW 1069066811...
create a patch [[[PowerPC] hoist xxspltiw instruction out of the loop for FMA mutation pass](https://github.com/llvm/llvm-project/pull/111696#top)
I closed the issue since the patch landed.
I can reproduce in c langague. `bash-5.2$ cat 113352.c` ```c #include uint64_t extract_bits1(uint64_t a) { return ((a >> 2) & 0x1) | ((a >> 5) & 0x6); } ```
please use the option `-fno-slp-vectorize` to disable the slp-vectorize pass. bash> clang -o 113352-pwr10-O2_aix_noslp.ll -fno-slp-vectorize -emit-llvm -S 113352.c -mcpu=pwr10 -O2 it will generate the IR as ```llvm ; Function Attrs:...
thanks for the fix @nemanjai , I tested it, it work. I will post a PR for the fix.
The issue has been fixed by commit 8ac9461e48e024448a2b6493b7c5b50629bc03d7 (HEAD) Author: Alexey Bataev Date: Sat Apr 11 08:18:36 2026 -0400 [SLP] Reject 2-element vectorization when vector inst count exceeds scalar The...
in the test case , there is `%7 = extractelement %6, i64 0` after the `VSX FMA Mutation` , it generate IR as ``` # Machine code for function initial:...
following patches fix the issue [[SelectionDAG] Introducing a new ISD::POISON SDNode to represent the poison value in the IR.](https://github.com/llvm/llvm-project/pull/125883#top) [Reland [SelectionDAG] Folding ZERO-EXTEND/SIGN_EXTEND poison to Poison value in getNode](https://github.com/llvm/llvm-project/pull/136701#top)