[llvm-commits] [llvm] r172145 - in /llvm/trunk: lib/Transforms/Scalar/LoopIdiomRecognize.cpp test/Transforms/LoopIdiom/X86/popcnt.ll

Sean Silva silvas at purdue.edu
Thu Jan 10 17:45:17 PST 2013


On Thu, Jan 10, 2013 at 6:32 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> The root cause is mistakenly taking for granted that
>     "dyn_cast<Instruction>(a-Value)"
> return a non-NULL instruction.

You should use cast<> when you know for sure the type. cast<> will
trigger an assertion failure if the type is wrong.

-- Sean Silva



More information about the llvm-commits mailing list