[all-commits] [llvm/llvm-project] 286237: InstCombine: Gracefully handle more allocas in the...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Dec 24 06:21:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 286237962ad35bc4756947c32310838ad4c76451
      https://github.com/llvm/llvm-project/commit/286237962ad35bc4756947c32310838ad4c76451
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2021-12-24 (Fri, 24 Dec 2021)

  Changed paths:
    M llvm/include/llvm/IR/Instructions.h
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    M llvm/test/Transforms/InstCombine/alloca-in-non-alloca-as.ll

  Log Message:
  -----------
  InstCombine: Gracefully handle more allocas in the wrong address space

Officially this is currently required to always use the datalayout's
alloca address space. This may change in the future, and it's cleaner
to propagate the existing alloca's addrspace anyway.

This is a triple fix. Initially the change in simplifyAllocaArraySize
would drop the address space, but produce output. Fixing this hit an
assertion in the cast combine.

This patch also makes the changes to handle this situation from
a33e12801279a947c74fdee2655b24480941fb39 dead, so eliminate
it. InstCombine should not take it upon itself to introduce
addrspacecasts, and preserve the original address space instead.




More information about the All-commits mailing list