I got J and K backward, many thanks to Eli for spotting this!
authorChris Lattner <sabre@nondot.org>
Mon, 15 Jun 2009 04:39:05 +0000 (04:39 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Jun 2009 04:39:05 +0000 (04:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73372 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index cb0b30c857ebf2af2bd02e92f84c713992392a52..de379e5e5f37a8d12d50e143eb8cae7a04f184a8 100644 (file)
@@ -8468,7 +8468,7 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
     return;
   case 'J':
     if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
-      if ((int8_t)C->getSExtValue() == C->getSExtValue()) {
+      if (C->getZExtValue() <= 63) {
         Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
         break;
       }
@@ -8476,7 +8476,7 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
     return;
   case 'K':
     if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
-      if (C->getZExtValue() <= 63) {
+      if ((int8_t)C->getSExtValue() == C->getSExtValue()) {
         Result = DAG.getTargetConstant(C->getZExtValue(), Op.getValueType());
         break;
       }