Hi Tim and other reviewers,
An assertion fails in TargetLoweringOpt::ShrinkDemandedOp() when trying to create a truncate from v1i64 to i32. This patch fixes this problem. As isZExtFree() and isTrancateFree() are not only used in ShrinkDemandedOp(), this patch also modifies isZExtFree() and isTrancateFree() to make the code more robust.
This case exposes that Type::isIntegerTy() and EVT::isInteger() have different semantics, which is quite confusing. EVT::isInteger() is currently like isIntOrIntVectorTy(). There is on function can check if an EVT is an scalar integer. Anyway, as I don't know whether it is proper to rename a function and add a function in EVT, and this will affect a lot of code, I don't do this in the patch.
Thanks,
-Hao