AMDGPU: Fix AMDGPUCodeGenPrepare using uninitialized AMDGPUAS struct

Not sure how this wasn't noticed before.

llvm-svn: 335828
This commit is contained in:
Matt Arsenault 2018-06-28 10:18:23 +00:00
parent 513e0c0ea4
commit 12269dda5c
1 changed files with 2 additions and 1 deletions

View File

@ -577,10 +577,11 @@ bool AMDGPUCodeGenPrepare::runOnFunction(Function &F) {
if (!TPC)
return false;
const TargetMachine &TM = TPC->getTM<TargetMachine>();
const AMDGPUTargetMachine &TM = TPC->getTM<AMDGPUTargetMachine>();
ST = &TM.getSubtarget<SISubtarget>(F);
DA = &getAnalysis<DivergenceAnalysis>();
HasUnsafeFPMath = hasUnsafeFPMath(F);
AMDGPUASI = TM.getAMDGPUAS();
bool MadeChange = false;