Skip to content

Commit 795f36e

Browse files
eternastudentoigcbot
authored andcommitted
Keep Fast Math Flags during memory operations simplifications.
1 parent 5e221df commit 795f36e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

IGC/Compiler/CISACodeGen/VectorPreProcess.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ namespace
170170
Value* args[4] = { ptr, offsetVal, builder.getInt32(alignment), builder.getInt1(isVolatile) };
171171
Function* newLdRawFunction =
172172
GenISAIntrinsic::getDeclaration(ldraw->getModule(), ldraw->getIntrinsicID(), types);
173-
return builder.CreateCall(newLdRawFunction, args);
173+
Instruction* newLdRaw = builder.CreateCall(newLdRawFunction, args);
174+
newLdRaw->copyFastMathFlags(ldraw);
175+
return newLdRaw;
174176
}
175177
}
176178
// Emulates a GEP on a pointer of the scalar type of returnType.

0 commit comments

Comments
 (0)