[PATCH] D35699: [PPC] Add Defs = [CARRY] to MIR SRADI_32
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 14:07:22 PDT 2017
Carrot created this revision.
Herald added a subscriber: nemanjai.
MIR SRADI uses instruction template XSForm_1rc which declares Defs = [CARRY]. But MIR SRADI_32 uses instruction template XSForm_1, and it doesn't declare such implicit definition. With patch https://reviews.llvm.org/D33720 it causes wrong code generation for perl.
This patch adds the implicit definition.
https://reviews.llvm.org/D35699
Files:
lib/Target/PowerPC/PPCInstr64Bit.td
Index: lib/Target/PowerPC/PPCInstr64Bit.td
===================================================================
--- lib/Target/PowerPC/PPCInstr64Bit.td
+++ lib/Target/PowerPC/PPCInstr64Bit.td
@@ -643,7 +643,7 @@
"sradi", "$rA, $rS, $SH", IIC_IntRotateDI,
[(set i64:$rA, (sra i64:$rS, (i32 imm:$SH)))]>, isPPC64;
// For fast-isel:
-let isCodeGenOnly = 1 in
+let isCodeGenOnly = 1, Defs = [CARRY] in
def SRADI_32 : XSForm_1<31, 413, (outs gprc:$rA), (ins gprc:$rS, u6imm:$SH),
"sradi $rA, $rS, $SH", IIC_IntRotateDI, []>, isPPC64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35699.107580.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170720/97c6fd73/attachment.bin>
More information about the llvm-commits
mailing list