[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 11:00:10 PST 2024


================
@@ -148,6 +172,14 @@ entry:
   %e = frem nnan float %x, %y
 ; CHECK:  %e_vec = frem nnan ninf <3 x float> %vec, %vec
   %e_vec = frem ninf nnan <3 x float> %vec, %vec
+; CHECK: %f = fpext nnan ninf float %x to double
+  %f = fpext ninf nnan float %x to double
+; CHECK: %f_vec = fpext nnan ninf <3 x float> %vec to <3 x double>
+  %f_vec = fpext ninf nnan <3 x float> %vec to <3 x double>
+; CHECK: %g = fptrunc nnan ninf float %x to half
+  %g = fptrunc ninf nnan float %x to half
+; CHECK: %g_vec = fptrunc nnan ninf <3 x float> %vec to <3 x half>
+  %g_vec = fptrunc ninf nnan <3 x float> %vec to <3 x half>
 ; CHECK:  ret float %e
   ret float %e
----------------
arsenm wrote:

Test scalable vector case

https://github.com/llvm/llvm-project/pull/115894


More information about the cfe-commits mailing list