File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
IGC/AdaptorOCL/preprocess_spvir Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -250,10 +250,6 @@ void PromoteBools::cleanUp(Module& module)
250
250
{
251
251
renameAndClean (globalVariable, it.second );
252
252
}
253
- else if (auto function = dyn_cast<Function>(it.first ))
254
- {
255
- renameAndClean (function, it.second );
256
- }
257
253
else if (auto alloca = dyn_cast<AllocaInst>(it.first ))
258
254
{
259
255
renameAndClean (alloca, it.second );
@@ -291,6 +287,15 @@ void PromoteBools::cleanUp(Module& module)
291
287
{
292
288
trunc->eraseFromParent ();
293
289
}
290
+
291
+ // Remove old version of functions
292
+ for (auto & it : promotedValuesCache)
293
+ {
294
+ if (auto function = dyn_cast<Function>(it.first ))
295
+ {
296
+ renameAndClean (function, it.second );
297
+ }
298
+ }
294
299
}
295
300
296
301
Type* PromoteBools::getOrCreatePromotedType (Type* type)
You can’t perform that action at this time.
0 commit comments