summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-11-22 03:04:55 +0000
committerDavide Italiano <davide@freebsd.org>2017-11-22 03:04:55 +0000
commitb480b5c2eebb9f8ea2923b071a1443f0145fa3a8 (patch)
treed4387d92ce283b64aae0494f2e112629dd8000c8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent5668d83e0e7b1221eb440e0e5aef049306b050a1 (diff)
downloadbcm5719-llvm-b480b5c2eebb9f8ea2923b071a1443f0145fa3a8.tar.gz
bcm5719-llvm-b480b5c2eebb9f8ea2923b071a1443f0145fa3a8.zip
[SCCP] Pick the right lattice value for constants.
After the dataflow algorithm proves that an argument is constant, it replaces it value with the integer constant and drops the lattice value associated to the DEF. e.g. in the example we have @f() that's called twice: call @f(undef, ...) call @f(2, ...) `undef` MEET 2 = 2 so we replace the argument and all its uses with the constant 2. Shortly after, tryToReplaceWithConstantRange() tries to get the lattice value for the argument we just replaced, causing an assertion. This function is a little peculiar as it runs when we're doing replacement and not as part of the solver but still queries the solver. The fix is that of checking whether we replaced the value already and get a temporary lattice value for the constant. Thanks to Zhendong Su for the report! Fixes PR35357. llvm-svn: 318817
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud