-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
backend:X86good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributemissed-optimization
Description
Noticed on #163516
define <8 x i64> @foo(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c) {
%and.demorgan = or <8 x i64> %b, %a
%and3.demorgan = or <8 x i64> %and.demorgan, %c
%and3 = xor <8 x i64> %and3.demorgan, splat (i64 -1)
ret <8 x i64> %and3
}
foo: # @foo
vporq %zmm0, %zmm1, %zmm1
vpternlogd $255, %zmm0, %zmm0, %zmm0 # zmm0 = -1
vpternlogq $30, %zmm2, %zmm1, %zmm0 # zmm0 = zmm0 ^ (zmm1 | zmm2)
retq
This should be able to fold to a single vpternlog instruction
VPTERNLOG construction is handled in X86ISelDAGToDAG.cpp
Metadata
Metadata
Assignees
Labels
backend:X86good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributemissed-optimization