Skip to content

Commit acb798e

Browse files
Revert "[X86] Remove Redundant memset Calls"
This reverts commit 4b805e1. It turns out the original commit was wrong and these were not just quieting valgrind down, but actually solving an issue. We now get MSan failures. Reverting to have some time to investigate. https://lab.llvm.org/buildbot/#/builders/164/builds/15562
1 parent 769c1ef commit acb798e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/X86/X86FloatingPoint.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ namespace {
5858

5959
struct FPS : public MachineFunctionPass {
6060
static char ID;
61-
FPS() : MachineFunctionPass(ID) {}
61+
FPS() : MachineFunctionPass(ID) {
62+
// This is really only to keep valgrind quiet.
63+
// The logic in isLive() is too much for it.
64+
memset(Stack, 0, sizeof(Stack));
65+
memset(RegMap, 0, sizeof(RegMap));
66+
}
6267

6368
void getAnalysisUsage(AnalysisUsage &AU) const override {
6469
AU.setPreservesCFG();

0 commit comments

Comments
 (0)