[llvm] [InstCombine] Fix for folding select-like `shufflevector` into floating point binary operators. (PR #85452)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 17 14:16:42 PDT 2024


================
@@ -380,7 +380,7 @@ define <4 x double> @fdiv_constant_op0(<4 x double> %v) {
   ret <4 x double> %s
 }
 
-define <4 x double> @fdiv_constant_op1(<4 x double> %v) {
+define <4 x double> @fdiv_constant_op1(<4 x double> nofpclass(nan) %v) {
 ; CHECK-LABEL: @fdiv_constant_op1(
 ; CHECK-NEXT:    [[S:%.*]] = fdiv reassoc <4 x double> [[V:%.*]], <double undef, double 1.000000e+00, double 4.300000e+01, double 4.400000e+01>
 ; CHECK-NEXT:    ret <4 x double> [[S]]
----------------
goldsteinn wrote:

Please keep the old tests so we can see the fix actually take affect.
You can add new tests with `nofpclass(nan)`.

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


More information about the llvm-commits mailing list