[llvm] r343270 - [ScalarizeMaskedMemIntrin] Handle the case where the mask is an all zero vector.

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 14:37:25 PDT 2018


On 9/27/2018 2:28 PM, Craig Topper via llvm-commits wrote:
> Author: ctopper
> Date: Thu Sep 27 14:28:46 2018
> New Revision: 343270
>
> URL: http://llvm.org/viewvc/llvm-project?rev=343270&view=rev
> Log:
> [ScalarizeMaskedMemIntrin] Handle the case where the mask is an all zero vector.
>
> This shouldn't really happen in practice I hope, but we tried to handle other constant cases. We missed this one because we checked for ConstantVector without realizing that zero becomes ConstantAggregateZero instead.
>
> So instead just check for Constant and use getAggregateElement which will do the dirty work for us.

getAggregateElement will fail (return null) on a ConstantExpr; is it 
possible to end up with one here?

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-commits mailing list