HomePhabricator

Fix for AMDGPU MUL_I24 known bits calculation

Authored by foad on Dec 16 2019, 2:21 AM.

Description

Fix for AMDGPU MUL_I24 known bits calculation

Summary:
At present, the code calculating known bits of AMDGPU MUL_I24 confuses the concepts of "non-negative number" and "positive number".

In some situations, it results in incorrect code. I have a case where the optimizer replaces the result of calculating MUL_I24(-5, 0) with -8.

Reviewers: foad, arsenm

Reviewed By: arsenm

Subscribers: foad, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Patch by Eugene Kuznetsov.

Differential Revision: https://reviews.llvm.org/D70367

Details

Committed
foadDec 16 2019, 2:25 AM
Reviewer
arsenm
Differential Revision
D70367: Fix for AMDGPU MUL_I24 known bits calculation
Parents
rG3b9715cb2193: [NFC] Fix typos in Clangd and Clang
Branches
Unknown
Tags
Unknown