banach-space wrote:

> Hi @banach-space followed the incubator
> 
> This is the IR generated with -fclangir
> 
> ```
> define dso_local <2 x i64> @test_vshlq_n_s64(<2 x i64> noundef %0) #0 {
>   br label %2
> 
> 2:                                                ; preds = %1
>   %3 = bitcast <2 x i64> %0 to <16 x i8>
>   %4 = bitcast <16 x i8> %3 to <2 x i64>
>   %5 = shl <2 x i64> %4, splat (i64 3)
>   br label %6
> 
> 6:                                                ; preds = %2
>   ret <2 x i64> %5
> }
> ```
> 
> this is the IR generated without -fclangir
> 
> ```
> define dso_local <2 x i64> @test_vshlq_n_s64(<2 x i64> noundef %a) #0 {
> entry:
>   %0 = bitcast <2 x i64> %a to <16 x i8>
>   %1 = bitcast <16 x i8> %0 to <2 x i64>
>   %vshl_n = shl <2 x i64> %1, splat (i64 3)
>   ret <2 x i64> %vshl_n
> } 
> ```
> 
> hence the slight difference in the test cases between neon-intrinsics.c and 
> intrinsics.c

Are you worried about the extra branch instructions? From what I can tell, you 
can just ignore them and still match using the original `CHECK` lines, no? 

The extra instructions will disappear once we enable `-simplifycfg` (or 
similar) in the CIR pipeline. Since that is orthogonal to lowering the 
builtins, it is OK to ignore that.

https://github.com/llvm/llvm-project/pull/187516
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to