Index: src/IceTargetLowering.cpp |
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp |
index 2935df9fd339b1c38d6dd625da703c95e2ea1b8d..b98ef389b5d5f888353015fb165221f023500791 100644 |
--- a/src/IceTargetLowering.cpp |
+++ b/src/IceTargetLowering.cpp |
@@ -308,6 +308,7 @@ TargetLowering::AutoBundle::~AutoBundle() { |
} |
void TargetLowering::genTargetHelperCalls() { |
+ GeneratingTargetHelpers = true; |
Jim Stichnoth
2016/02/12 02:32:50
It would be nice to use a RAII helper object for t
Eric Holk
2016/02/12 18:38:15
Done.
|
for (CfgNode *Node : Func->getNodes()) { |
Context.init(Node); |
while (!Context.atEnd()) { |
@@ -315,6 +316,7 @@ void TargetLowering::genTargetHelperCalls() { |
genTargetHelperCallFor(Context.getCur()); |
} |
} |
+ GeneratingTargetHelpers = false; |
} |
void TargetLowering::doAddressOpt() { |
@@ -706,10 +708,9 @@ void TargetLowering::scalarizeArithmetic(InstArithmetic::OpKind Kind, |
Variable *Dest, Operand *Src0, |
Operand *Src1) { |
scalarizeInstruction( |
- Dest, Src0, Src1, |
- [this, Kind](Variable *Dest, Variable *Src0, Variable *Src1) { |
+ Dest, [this, Kind](Variable *Dest, Operand *Src0, Operand *Src1) { |
return Context.insert<InstArithmetic>(Kind, Dest, Src0, Src1); |
- }); |
+ }, Src0, Src1); |
} |
void TargetLowering::emitWithoutPrefix(const ConstantRelocatable *C, |