Replace the integer immediate intrisics with splat vector variants so they can be applied as optimizations for the C/C++ intrinsics.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/IR/IntrinsicsAArch64.td | ||
---|---|---|
1120–1121 | Why do we need to treat subr specially here? It's just a plain subtraction; the only interesting bit is that the immediate is in the first operand of the IR "sub" instruction, instead of the second. |
llvm/include/llvm/IR/IntrinsicsAArch64.td | ||
---|---|---|
1120–1121 | I just added an intrinsic for this one because I didn't have a direct match for the subr in the basic operations set. I suppose I could use sub and create an extra class to match the sub with immediate as the first operand. Is that what you were expecting? |
llvm/include/llvm/IR/IntrinsicsAArch64.td | ||
---|---|---|
1120–1121 | Yes, something like that. |
llvm/include/llvm/IR/IntrinsicsAArch64.td | ||
---|---|---|
1120–1121 | Done |
This seems to break CodeGen/AArch64/sve-gather-scatter-dag-combine.ll everywhere, e.g. http://45.33.8.238/linux/5970/step_12.txt
This https://reviews.llvm.org/rGeb1857ce0da481caf82271e6d0c9fc745dfab26f fixes this error for now.
For llvm/test/CodeGen/AArch64/sve-gather-scatter-dag-combine.ll it is still not performing the dag combine, however the resulting assembly is different because this matches with the new AArch64dup pattern for logical vector and immediate AND.
Why do we need to treat subr specially here? It's just a plain subtraction; the only interesting bit is that the immediate is in the first operand of the IR "sub" instruction, instead of the second.