================
@@ -35,3 +44,33 @@ float testFabsf(float x) {
   return fabsf(x);
   // CHECK: cir.fabs %{{.+}} : !cir.float
 }
+
+int abs(int);
+int testAbs(int x) {
+  return abs(x);
+  // CHECK: cir.abs %{{.+}} min_is_poison : !s32i
+  // LLVM: %{{.+}} = call i32 @llvm.abs.i32(i32 %{{.+}}, i1 true)
+  // OGCG: %{{.+}} = call i32 @llvm.abs.i32(i32 %{{.+}}, i1 true)
+  // CIR_NO_POISON: cir.abs %{{.+}} : !s32i
----------------
andykaylor wrote:

This would still pass if we emitted `min_is_poison`. I think you need the 
wildcard match to end when it encounters a space. I think this will work.
```suggestion
  // CIR_NO_POISON: cir.abs %{{\S+}} : !s32i
```

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

Reply via email to