================
@@ -248,4 +248,16 @@ __attribute__((optnone)) T func_22(T x, T y) {
 
 float func_23(float x, float y) {
   return func_22(x, y);
-}
\ No newline at end of file
+}
+
+// CHECK-LABEL: FunctionDecl {{.*}} func_24 'vector2float (vector2double)'
+// CHECK:         CompoundStmt {{.*}} FPContractMode=2 
ConstRoundingMode=towardzero
+// CHECK:           ReturnStmt
+// CHECK:             ConvertVectorExpr {{.*}} FPContractMode=2 
ConstRoundingMode=towardzero
+
+typedef double vector2double __attribute__((__vector_size__(16)));
+typedef float  vector2float  __attribute__((__vector_size__(8)));
+#pragma STDC FENV_ROUND FE_TOWARDZERO
----------------
shafik wrote:

I don't see other tests doing this but we should test also the absence of FP 
options in the AST as well when nothing is set. This would test that we are not 
incorrectly identifying that `hasStoredFPFeatures()` is true and that we don't 
get garbage values.

https://github.com/llvm/llvm-project/pull/125522
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to