[SimplifyCFG] Handle AssumptionCache being null.
authorRodrigo Caetano Rocha <rcor.cs@gmail.com>
Sat, 7 Dec 2019 16:47:00 +0000 (16:47 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sat, 7 Dec 2019 16:54:49 +0000 (16:54 +0000)
commitd714aa0dfdb16270fc279e8e91d4a83ace531529
tree20cfa25ed25d3fbad2a1b80413ca41a9b084784e
parent071dca24cea9dcabe25cbe98c4053d874183be37
[SimplifyCFG] Handle AssumptionCache being null.

AssumptionCache can be null in SimplifyCFGOptions. However, FoldCondBranchOnPHI() was not properly handling that when passing a null AssumptionCache to simplifyCFG.

Patch by Rodrigo Caetano Rocha <rcor.cs@gmail.com>

Reviewers: fhahn, lebedev.ri, spatel

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D69963
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/unittests/Transforms/Utils/LocalTest.cpp