================
@@ -0,0 +1,68 @@
+
+// RUN: cir-opt %s -cir-call-conv-lowering="classification-attr=test_classify" 
\
+// RUN:   | FileCheck %s
+
+!s8i = !cir.int<s, 8>
+!u8i = !cir.int<u, 8>
+
+#extend_signed_return = {
+  return = { kind = "extend",
+             coerced_type = !cir.int<s, 32>,
+             sign_extend = true },
+  args = [ ]
+}
+
+#extend_unsigned_return = {
+  return = { kind = "extend",
+             coerced_type = !cir.int<u, 32>,
+             sign_extend = false },
+  args = [ ]
+}
+
+module attributes {
+  dlti.dl_spec = #dlti.dl_spec<
+    #dlti.dl_entry<i8, dense<8>: vector<2xi64>>,
+    #dlti.dl_entry<i32, dense<32>: vector<2xi64>>>
+} {
+  // An existing zeroext must be replaced with signext.
+  cir.func @returns_s8() -> (!s8i {llvm.zeroext})
----------------
andykaylor wrote:

I think we should reject an extension that disagrees with the value's 
signedness. If that triggers errors on anything we're producing, I would want 
to examine the code more closely to see why it's happening.

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

Reply via email to