albertbolt1 wrote:

Hi @banach-space , 

I was working on upstreaming vshl_v 

facing an issue with porting existing test cases 

for example I have to add this test to intrinsics.c and for test we run with 
-fclangir on and -fclangir off
```
// CHECK-LABEL: define dso_local <8 x i8> @test_vshl_s8(
// CHECK-SAME: <8 x i8> noundef [[A:%.*]], <8 x i8> noundef [[B:%.*]]) 
#[[ATTR0]] {
// CHECK-NEXT:  [[ENTRY:.*:]]
// CHECK-NEXT:    [[VSHL_V_I:%.*]] = call <8 x i8> 
@llvm.aarch64.neon.sshl.v8i8(<8 x i8> [[A]], <8 x i8> [[B]])
// CHECK-NEXT:    ret <8 x i8> [[VSHL_V_I]]
//
int8x8_t test_vshl_s8(int8x8_t a, int8x8_t b) {
  return vshl_s8(a, b);
}
```

with -fclangir  -emit-llvm we do not get llvm.aarch64.neon.sshl.v8i8(<8 x i8> 
[[A]], <8 x i8> [[B]]) 
we get shl <8 x i8> [[A]], [[B]] but the below test case fails 

```
// ALL-LABEL: test_vshl_s8
int8x8_t test_vshl_s8(int8x8_t a, int8x8_t b) {

// LLVM-SAME: <8 x i8> {{.*}} [[A:%.*]], <8 x i8> {{.*}} [[B:%.*]]) #{{.*}} {
// LLVM: [[VSHL_V_I:%.*]] = shl <8 x i8> [[A]], [[B]]
// LLVM:    ret <8 x i8> [[VSHL_V_I]]
  return vshl_s8(a, b);
}
```

because the output is different with -fclangir and without it. 

how should we deal with such a case









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

Reply via email to