commit | 61710dfa3ab1cec87b34ad912d50e0cba6e9a39c | [log] [tgz] |
---|---|---|
author | Davide Italiano <davide@freebsd.org> | Mon Apr 17 20:49:50 2017 +0000 |
committer | Davide Italiano <davide@freebsd.org> | Mon Apr 17 20:49:50 2017 +0000 |
tree | 71f063af77ddee35dceac953304c375d7ec7b7d4 | |
parent | e35a5f551844de40cbcf3ec1335c428e3f4302b7 [diff] |
[InstCombine] Matchers work with both ConstExpr and Instructions. So, `cast<Instruction>` is not guaranteed to succeed. Change the code so that we create a new constant and use it in the newly created instruction, as it's done in other places in InstCombine. OK'ed by Sanjay/Craig. Fixes PR32686. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300495 91177308-0d34-0410-b5e6-96231b3b80d8