X86: initialize a few subtarget variables.
authorTim Northover <tnorthover@apple.com>
Mon, 1 May 2017 17:50:15 +0000 (17:50 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 1 May 2017 17:50:15 +0000 (17:50 +0000)
Otherwise an indeterminate value gets read, causing a bunch of UBSan failures.

llvm-svn: 301819

llvm/lib/Target/X86/X86Subtarget.cpp

index b805ddf..82ff436 100644 (file)
@@ -290,6 +290,9 @@ void X86Subtarget::initializeEnvironment() {
   HasMWAITX = false;
   HasCLZERO = false;
   HasMPX = false;
+  HasSGX = false;
+  HasCLFLUSHOPT = false;
+  HasCLWB = false;
   IsBTMemSlow = false;
   IsPMULLDSlow = false;
   IsSHLDSlow = false;