[llvm] r312364 - [AMDGPU] Prevent infinite recursion in DAG.computeKnownBits()
Mekhanoshin, Stanislav via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 14:11:37 PDT 2017
That's a little tricky. The actual testcase is huge. I'm trying to minimize it, but actually the mistake was trivial.
Stas
-----Original Message-----
From: davide.italiano at gmail.com [mailto:davide.italiano at gmail.com] On Behalf Of Davide Italiano
Sent: Friday, September 01, 2017 1:52 PM
To: Mekhanoshin, Stanislav <Stanislav.Mekhanoshin at amd.com>
Cc: llvm-commits <llvm-commits at lists.llvm.org>
Subject: Re: [llvm] r312364 - [AMDGPU] Prevent infinite recursion in DAG.computeKnownBits()
On Fri, Sep 1, 2017 at 1:43 PM, Stanislav Mekhanoshin via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> Author: rampitec
> Date: Fri Sep 1 13:43:20 2017
> New Revision: 312364
>
> URL: http://llvm.org/viewvc/llvm-project?rev=312364&view=rev
> Log:
> [AMDGPU] Prevent infinite recursion in DAG.computeKnownBits()
>
> Differential Revision: https://reviews.llvm.org/D37392
>
> Modified:
> llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGP
> UISelLowering.cpp?rev=312364&r1=312363&r2=312364&view=diff
> ======================================================================
> ========
> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Fri Sep 1
> +++ 13:43:20 2017
> @@ -3886,8 +3886,8 @@ void AMDGPUTargetLowering::computeKnownB
> case AMDGPUISD::MUL_U24:
> case AMDGPUISD::MUL_I24: {
> KnownBits LHSKnown, RHSKnown;
> - DAG.computeKnownBits(Op.getOperand(0), LHSKnown);
> - DAG.computeKnownBits(Op.getOperand(1), RHSKnown);
> + DAG.computeKnownBits(Op.getOperand(0), LHSKnown, Depth + 1);
> + DAG.computeKnownBits(Op.getOperand(1), RHSKnown, Depth + 1);
>
> unsigned TrailZ = LHSKnown.countMinTrailingZeros() +
> RHSKnown.countMinTrailingZeros();
>
>
This misses a testcase. Can you please add one?
Thanks,
--
Davide
More information about the llvm-commits
mailing list