[all-commits] [llvm/llvm-project] 930a68: [Loads] Check type size in bits during store to lo...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Apr 8 08:29:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 930a68765dff96927d706d258ef0c2ad9c7ec2ab
      https://github.com/llvm/llvm-project/commit/930a68765dff96927d706d258ef0c2ad9c7ec2ab
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-04-08 (Fri, 08 Apr 2022)

  Changed paths:
    M llvm/lib/Analysis/Loads.cpp
    M llvm/test/Transforms/InstCombine/load-store-forward.ll

  Log Message:
  -----------
  [Loads] Check type size in bits during store to load forwarding

Rather than checking the rounded type store size, check the type
size in bits. We don't want to forward a store of i1 to a load
of i8 for example, even though they have the same type store size.
The padding bits have unspecified contents.

This is a partial fix for the issue reported at
https://reviews.llvm.org/D115924#inline-1179482,
the problem also needs to be addressed more generally in the
constant folding code.




More information about the All-commits mailing list