From 881b0b5c77ec3f6849e32b7763b6c75057b81501 Mon Sep 17 00:00:00 2001 From: Joey Gouly Date: Mon, 8 Jul 2013 19:52:51 +0000 Subject: [PATCH] Add a comment to this change, requested by Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185853 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMISelDAGToDAG.cpp | 4 ++++ test/CodeGen/ARM/arm-modifier.ll | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp index da0fe2cf7d4..4eda5dc9e69 100644 --- a/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -3491,6 +3491,10 @@ SDNode *ARMDAGToDAGISel::SelectInlineAsm(SDNode *N){ else continue; + // Immediate operands to inline asm in the SelectionDAG are modeled with + // two operands. The first is a constant of value InlineAsm::Kind_Imm, and + // the second is a constant with the value of the immediate. If we get here + // and we have a Kind_Imm, skip the next operand, and continue. if (Kind == InlineAsm::Kind_Imm) { SDValue op = N->getOperand(++i); AsmNodeOperands.push_back(op); diff --git a/test/CodeGen/ARM/arm-modifier.ll b/test/CodeGen/ARM/arm-modifier.ll index e6358d481e9..a364793deaf 100644 --- a/test/CodeGen/ARM/arm-modifier.ll +++ b/test/CodeGen/ARM/arm-modifier.ll @@ -66,6 +66,7 @@ entry: ret i64 %0 } +; PR16490 define void @f5(i64 %__pu_val) { call void asm sideeffect "$1", "r,i"(i64 %__pu_val, i32 -14) ret void -- 2.34.1