[llvm] r279761 - GlobalISel: mark overflow bit of overflow ops legal.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 10:37:41 PDT 2016


Author: tnorthover
Date: Thu Aug 25 12:37:41 2016
New Revision: 279761

URL: http://llvm.org/viewvc/llvm-project?rev=279761&view=rev
Log:
GlobalISel: mark overflow bit of overflow ops legal.

It's expected this will map to NZCV register class and be properly selectable.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp?rev=279761&r1=279760&r2=279761&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp Thu Aug 25 12:37:41 2016
@@ -47,10 +47,13 @@ AArch64MachineLegalizer::AArch64MachineL
     for (auto Ty : {s32, s64})
       setAction({BinOp, Ty}, Legal);
 
-  for (auto Op : { G_UADDE, G_USUBE, G_SADDO, G_SSUBO, G_SMULO, G_UMULO })
+  for (auto Op : { G_UADDE, G_USUBE, G_SADDO, G_SSUBO, G_SMULO, G_UMULO }) {
     for (auto Ty : { s32, s64 })
       setAction({Op, Ty}, Legal);
 
+    setAction({Op, 1, s1}, Legal);
+  }
+
   for (auto BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV})
     for (auto Ty : {s32, s64})
       setAction({BinOp, Ty}, Legal);




More information about the llvm-commits mailing list