Reuse a lookup in an assert.
authorEric Christopher <echristo@gmail.com>
Tue, 28 Apr 2015 22:38:35 +0000 (22:38 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 28 Apr 2015 22:38:35 +0000 (22:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236054 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 60c3e69ff141d70a6eb6f9d582d3c1c246557859..c2809fe9dd6c180b31be62f20f9e09328ee7dc8d 100644 (file)
@@ -2269,10 +2269,10 @@ static ArrayRef<MCPhysReg> get64BitArgumentXMMs(MachineFunction &MF,
 
   const Function *Fn = MF.getFunction();
   bool NoImplicitFloatOps = Fn->hasFnAttribute(Attribute::NoImplicitFloat);
-  assert(!(MF.getTarget().Options.UseSoftFloat && NoImplicitFloatOps) &&
+  bool isSoftFloat = MF.getTarget().Options.UseSoftFloat;
+  assert(!(isSoftFloat && NoImplicitFloatOps) &&
          "SSE register cannot be used when SSE is disabled!");
-  if (MF.getTarget().Options.UseSoftFloat || NoImplicitFloatOps ||
-      !Subtarget->hasSSE1())
+  if (isSoftFloat || NoImplicitFloatOps || !Subtarget->hasSSE1())
     // Kernel mode asks for SSE to be disabled, so there are no XMM argument
     // registers.
     return None;