From d8a6d7ce91b0ff2d8a87bf53da33cd3dc3b20185 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 25 Aug 2016 17:37:41 +0000 Subject: [PATCH] GlobalISel: mark overflow bit of overflow ops legal. It's expected this will map to NZCV register class and be properly selectable. llvm-svn: 279761 --- llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp b/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp index 4e533dd..d8f72a9 100644 --- a/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp +++ b/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp @@ -47,10 +47,13 @@ AArch64MachineLegalizer::AArch64MachineLegalizer() { 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); -- 2.7.4