[llvm] [AMDGPU] Fix canonicalization of truncated values. (PR #83054)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 03:01:58 PST 2024


================
@@ -3590,6 +3618,17 @@ FPMinMaxPat<Instruction minmaxInst, ValueType vt, SDPatternOperator min_or_max,
               DSTCLAMP.NONE, DSTOMOD.NONE)
 >;
 
+class
+FPMinCanonMaxPat<Instruction minmaxInst, ValueType vt, SDPatternOperator min_or_max,
+                 SDPatternOperator max_or_min_oneuse> : GCNPat <
+  (min_or_max (is_canonicalized_1<fcanonicalize>
----------------
jayfoad wrote:

I wonder how many more fp patterns there are that might need to skip over an `fcanonicalize` in the middle.

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


More information about the llvm-commits mailing list