[PATCH] D66805: [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 12:32:45 PDT 2019
atanasyan added inline comments.
================
Comment at: llvm/test/CodeGen/Mips/msa/arithmetic.ll:220-241
define void @sub_v2i64_i(<2 x i64>* %c, <2 x i64>* %a) nounwind {
; MIPS-LABEL: sub_v2i64_i:
; MIPS: # %bb.0:
; MIPS-NEXT: ldi.b $w0, -1
; MIPS-NEXT: shf.w $w0, $w0, 177
; MIPS-NEXT: ld.d $w1, 0($5)
; MIPS-NEXT: addv.d $w0, $w1, $w0
----------------
lebedev.ri wrote:
> Hm, this one didn't get recovered by the patch.
I saw this regression. Unfortunately I could not quickly create a fix for it. As far as I remember, the problem is in this statement `auto *BVN = dyn_cast<BuildVectorSDNode>(C)`. In `@sub_v2i64_i` the second operand (i.e. `C`) is a bitcast and `dyn_cast<BuildVectorSDNode>` returns zero. Right now I do not have a time to dig it. Maybe next week.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66805/new/
https://reviews.llvm.org/D66805
More information about the llvm-commits
mailing list