diff --git a/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp b/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp index 1e57d025da3b8c5..72fa9891bfd8e65 100644 --- a/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp +++ b/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp @@ -362,13 +362,13 @@ static Value *expandClampIntrinsic(CallInst *Orig, } static Value *expandSignIntrinsic(CallInst *Orig) { - IRBuilder<> Builder(Orig->getParent()); Value *X = Orig->getOperand(0); Type *Ty = X->getType(); Type *ScalarTy = Ty->getScalarType(); Type *RetTy = Orig->getType(); Constant *Zero = Constant::getNullValue(Ty); - Builder.SetInsertPoint(Orig); + + IRBuilder<> Builder(Orig); Value *GT; Value *LT;