[PATCH] D146121: [DAG] Move lshr narrowing from visitANDLike to SimplifyDemandedBits (WIP)
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 11:47:07 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/test/CodeGen/X86/h-register-addressing-64.ll:67
+; CHECK-NEXT: andl $2040, %esi # imm = 0x7F8
+; CHECK-NEXT: movzbl (%rdi,%rsi), %eax
; CHECK-NEXT: retq
----------------
I think this is okay here. We only get the right codegen by chance here and I don't think its something we can reasonably control during DAG isel.
I tried to improve this with D141653. Looked good for the tests but caused infinite loop in bootstrap build.
I think this (along with other `imm` level optimizations), need to be moved to a new pass (or function in isel) that runs at the very end.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146121/new/
https://reviews.llvm.org/D146121
More information about the llvm-commits
mailing list