[SCEVExpander] ReuseOrCreateCast(): use IRBuilder to actually create the cast
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 19 Apr 2021 15:30:56 +0000 (18:30 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 19 Apr 2021 15:38:39 +0000 (18:38 +0300)
commitd746fefb6ffde82bc6ea4e2ccf6c637ee521423e
treeb3d2b20dac15174f2d215a6cda3bcb20a9b0e263
parentecc9d7e913eec96816499d0a328c6134281f8aad
[SCEVExpander] ReuseOrCreateCast(): use IRBuilder to actually create the cast

In particular, this allows to create constant expressions
instead of IR Instruction's if the argumen is a constant.
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
llvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll