On Wed, Jul 5, 2023 at 2:25 AM simonaytes.yan--- via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> PR target/110438 requests to emit PXOR before VPTERNLOG. This patch
> implements that.

I prefer using UNSPEC_INSN_FALSE_DEP like we did for lzcnt/tzcnt/popcnt.

i.e.
18866; False dependency happens when destination is only updated by tzcnt,
18867; lzcnt or popcnt.  There is no false dependency when destination is
18868; also used in source.
18869(define_insn "*popcountsi2_zext_falsedep"
18870  [(set (match_operand:DI 0 "register_operand" "=r")
18871        (and:DI
18872          (subreg:DI
18873            (popcount:SI
18874              (match_operand:SI 1 "nonimmediate_operand" "rm")) 0)
18875          (const_int 63)))
18876   (unspec [(match_operand:DI 2 "register_operand" "0")]
18877           UNSPEC_INSN_FALSE_DEP)
18878   (clobber (reg:CC FLAGS_REG))]
18879  "TARGET_POPCNT && TARGET_64BIT"


BTW, I also posted a patch for this issue at
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623523.html

-- 
BR,
Hongtao

Reply via email to