================
@@ -936,3 +936,45 @@ uint32x4_t test_vabaq_u32(uint32x4_t v1, uint32x4_t v2,
uint32x4_t v3) {
// LLVM-NEXT: ret <4 x i32> [[ADD_I]]
return vabaq_u32(v1, v2, v3);
}
+
+// LLVM-LABEL: @test_vshld_n_s64
+// CIR-LABEL: @test_vshld_n_s64
+int64_t test_vshld_n_s64(int64_t a) {
+ // CIR: cir.shift(left, {{.*}})
+
+ // LLVM-SAME: i64 noundef [[A:%.*]])
+ // LLVM: [[SHL_N:%.*]] = shl i64 [[A]], 1
+ // LLVM: ret i64 [[SHL_N]]
+ return (int64_t)vshld_n_s64(a, 1);
+}
+
+// LLVM-LABEL: @test_vshld_n_u64
+// CIR-LABEL: @test_vshld_n_u64
+int64_t test_vshld_n_u64(int64_t a) {
+ // CIR: cir.shift(left, {{.*}})
+
+ // LLVM-SAME: i64 noundef [[A:%.*]])
+ // LLVM: [[SHL_N:%.*]] = shl i64 [[A]], 1
+ // LLVM: ret i64 [[SHL_N]]
+ return (int64_t)vshld_n_u64(a, 1);
+}
+
+// LLVM-LABEL: @test_vshld_s64
+// CIR-LABEL: @test_vshld_s64
+int64_t test_vshld_s64(int64_t a,int64_t b) {
+
+ // LLVM-SAME: i64 noundef [[A:%.*]], i64 noundef [[B:%.*]]) #[[ATTR0:[0-9]+]]
{
+ // LLVM: [[VSHLD_S64_I:%.*]] = call i64 @llvm.aarch64.neon.sshl.i64(i64
[[A]], i64 [[B]])
+ // LLVM: ret i64 [[VSHLD_S64_I]]
+ return (int64_t)vshld_s64(a, b);
+}
+
+// LLVM-LABEL: @test_vshld_u64
+// CIR-LABEL: @test_vshld_u64
+int64_t test_vshld_u64(int64_t a,int64_t b) {
+
+ // LLVM-SAME: i64 noundef [[A:%.*]], i64 noundef [[B:%.*]]) #[[ATTR0:[0-9]+]]
{
+ // LLVM: [[VSHLD_S64_I:%.*]] = call i64 @llvm.aarch64.neon.ushl.i64(i64
[[A]], i64 [[B]])
+ // LLVM: ret i64 [[VSHLD_S64_I]]
+ return (int64_t)vshld_u64(a, b);
+}
----------------
albertbolt1 wrote:
added
https://github.com/llvm/llvm-project/pull/186406
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits