[llvm] [AArch64][GlobalISel] More FCmp legalization. (PR #78734)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 08:10:37 PST 2024


================
@@ -1556,6 +1556,16 @@ LegalizerHelper::LegalizeResult LegalizerHelper::narrowScalar(MachineInstr &MI,
     MI.eraseFromParent();
     return Legalized;
   }
+  case TargetOpcode::G_FCMP:
+    Observer.changingInstr(MI);
+    if (TypeIdx == 0)
+      narrowScalarDst(MI, NarrowTy, 0, TargetOpcode::G_ZEXT);
+    else {
+      return UnableToLegalize;
----------------
arsenm wrote:

Turn this into early return, you are calling the observer on the failure path 

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


More information about the llvm-commits mailing list