[PATCH] D142339: [X86] Fix `FindSingleBitChange` to handle NOT(V) where V is not an Instruction

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 02:36:00 PST 2023


goldstein.w.n created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Was previously buggy to assume that NOT'd Value was always an
instruction. If the NOT'd value is not an Instruction, we should just
return as its either a constant, in which can we will re-run the logic
after constant-folding, or its a type we can't evaluate anyways.

This is a follow up to: `D140939`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142339

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/atomic-rm-bit-test-64.ll
  llvm/test/CodeGen/X86/atomic-rm-bit-test.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142339.491270.patch
Type: text/x-patch
Size: 6473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230123/afed3db4/attachment.bin>


More information about the llvm-commits mailing list