[llvm] AMDGPU: Update pattern matching from "x&(-1>>(32-y))" to "bfe x, 0, y" (PR #116115)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 07:36:43 PST 2024
changpeng wrote:
[AMD Official Use Only - AMD Internal Distribution Only]
Right. So bfe x, 0, 32 is the same as bfe x, 0, 0 and the result is 0. But x & (-1 >> 0) equals x.
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Jay Foad ***@***.***>
Sent: Thursday, November 14, 2024 2:58:44 AM
To: llvm/llvm-project ***@***.***>
Cc: Fang, Changpeng ***@***.***>; Author ***@***.***>
Subject: Re: [llvm/llvm-project] AMDGPU: Update pattern matching from "x&(-1>>(32-y))" to "bfe x, 0, y" (PR #116115)
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
The description in the RDNA3 ISA says D0.u = ((S0.u >> S1.u[4 : 0].u) & 32'U((1 << S2.u[4 : 0].u) - 1))
This says that it only looks at bits 4:0 of S2, so 32 would be treated the same as 0.
—
Reply to this email directly, view it on GitHub<https://github.com/llvm/llvm-project/pull/116115#issuecomment-2476038706>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABALCLIIE2I7JBLDOKAH7PT2AR66JAVCNFSM6AAAAABRXR3SD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGAZTQNZQGY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
https://github.com/llvm/llvm-project/pull/116115
More information about the llvm-commits
mailing list