]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Add vect_concat with zeroes annotation to addp pattern
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Sun, 23 Apr 2023 13:40:17 +0000 (14:40 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Sun, 23 Apr 2023 13:40:17 +0000 (14:40 +0100)
Similar to others, the addp pattern can be safely annotated with <vczle><vczbe> to create
the implicit vec_concat-with-zero variants.

Bootstrapped and tested on aarch64-none-linux-gnu and aarch64_be-none-elf.

gcc/ChangeLog:

PR target/99195
* config/aarch64/aarch64-simd.md (aarch64_addp<mode>): Rename to...
(aarch64_addp<mode><vczle><vczbe>): ... This.

gcc/testsuite/ChangeLog:

PR target/99195
* gcc.target/aarch64/simd/pr99195_1.c: Add testing for vpadd intrinsics.

gcc/config/aarch64/aarch64-simd.md
gcc/testsuite/gcc.target/aarch64/simd/pr99195_1.c

index adcad56cf553c3e9afebb7adf2731fbc48c9a8af..4a1ec71995da427567cc4d0df104e870a4091e34 100644 (file)
 
 ;; addp
 
-(define_insn "aarch64_addp<mode>"
+(define_insn "aarch64_addp<mode><vczle><vczbe>"
   [(set (match_operand:VDQ_I 0 "register_operand" "=w")
         (unspec:VDQ_I
           [(match_operand:VDQ_I 1 "register_operand" "w")
index 3ddd5a37af0319594f0fb9275546ad9af03081bc..3fe0e53bcd086a202ec1580a0b118121ef9334cc 100644 (file)
@@ -37,13 +37,18 @@ OPFOUR (T, IS, OS, S, OP2, OP3, OP4, OP5)
 FUNC (T, IS, OS, OP1, S)                \
 OPFIVE (T, IS, OS, S, OP2, OP3, OP4, OP5, OP6)
 
-OPSIX (int8, 8, 16, s8, add, sub, mul, and, orr, eor)
-OPSIX (int16, 4, 8, s16, add, sub, mul, and, orr, eor)
-OPSIX (int32, 2, 4, s32, add, sub, mul, and, orr, eor)
+#define OPSEVEN(T,IS,OS,S,OP1,OP2,OP3,OP4,OP5,OP6,OP7)        \
+FUNC (T, IS, OS, OP1, S)                \
+OPSIX (T, IS, OS, S, OP2, OP3, OP4, OP5, OP6, OP7)
+
+
+OPSEVEN (int8, 8, 16, s8, padd, add, sub, mul, and, orr, eor)
+OPSEVEN (int16, 4, 8, s16, padd, add, sub, mul, and, orr, eor)
+OPSEVEN (int32, 2, 4, s32, padd, add, sub, mul, and, orr, eor)
 
-OPSIX (uint8, 8, 16, u8, add, sub, mul, and, orr, eor)
-OPSIX (uint16, 4, 8, u16, add, sub, mul, and, orr, eor)
-OPSIX (uint32, 2, 4, u32, add, sub, mul, and, orr, eor)
+OPSEVEN (uint8, 8, 16, u8, padd, add, sub, mul, and, orr, eor)
+OPSEVEN (uint16, 4, 8, u16, padd, add, sub, mul, and, orr, eor)
+OPSEVEN (uint32, 2, 4, u32, padd, add, sub, mul, and, orr, eor)
 
 /* { dg-final { scan-assembler-not {\tfmov\t} } }  */
 /* { dg-final { scan-assembler-not {\tmov\t} } }  */