[all-commits] [llvm/llvm-project] 8c510a: [GVN] Pre-commit tests for byte conversions

Pedro Lobo via All-commits all-commits at lists.llvm.org
Fri Sep 25 10:42:40 PDT 2026


  Branch: refs/heads/users/pedroclobo/gvn-byte-forwarding
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c510a53f36a7f08faa7ebe5b65e8b1cb927db7e
      https://github.com/llvm/llvm-project/commit/8c510a53f36a7f08faa7ebe5b65e8b1cb927db7e
  Author: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    A llvm/test/Transforms/GVN/byte-conversion.ll

  Log Message:
  -----------
  [GVN] Pre-commit tests for byte conversions


  Commit: 53afbe1999b99f0449702c757c61683565f407a1
      https://github.com/llvm/llvm-project/commit/53afbe1999b99f0449702c757c61683565f407a1
  Author: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Utils/VNCoercion.cpp
    M llvm/test/Transforms/GVN/byte-conversion.ll

  Log Message:
  -----------
  [GVN] Don't coerce forwarded byte values through integers

When GVN forwards a store to a load of a different type, it goes through an
integer. It casts the stored value to `iN`, then shifts and truncates it. For
byte values that cast is wrong. It drops pointer provenance, and a single
poison bit makes the whole result poison.

Byte stores, and pointer stores that feed byte loads, no longer go through an
integer. GVN bitcasts the stored value to `bN`, takes the loaded bits with
`bitextract`, and bitcasts the result to the load type. Byte vector stores
take the same path.


Compare: https://github.com/llvm/llvm-project/compare/c8ab525f38c5...53afbe1999b9

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list