Skip to content

Commit c7ccc54

Browse files
committed
[clang][wip] Add nondeterministic initialization for floating point
1 parent c8dddc0 commit c7ccc54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,8 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
15971597
} else {
15981598
assert(!emission.useLifetimeMarkers());
15991599
}
1600-
if (allocaTy->isIntegerTy() && HaveInsertPoint()) {
1600+
if ((allocaTy->isIntegerTy() || allocaTy->isFloatingPointTy()) &&
1601+
HaveInsertPoint()) {
16011602
auto Freeze = Builder.CreateFreeze(llvm::PoisonValue::get(allocaTy),
16021603
"freeze.poison");
16031604
Builder.CreateStore(Freeze, address);

0 commit comments

Comments
 (0)