[all-commits] [llvm/llvm-project] 87bdde: [ConstantFold] Skip bitcast -> GEP transform for o...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 22 06:51:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 87bdde4962ea926e81a3534119ac8f02901b75b9
      https://github.com/llvm/llvm-project/commit/87bdde4962ea926e81a3534119ac8f02901b75b9
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Transforms/InstCombine/opaque-ptr.ll

  Log Message:
  -----------
  [ConstantFold] Skip bitcast -> GEP transform for opaque pointers

Same as with the InstCombine transform, this is not possible for
bitcasts involving opaque pointers, as GEP preserves opaqueness.


  Commit: e638a290f7d0bb85dbf81ba34eaaeef8c8d1b42d
      https://github.com/llvm/llvm-project/commit/e638a290f7d0bb85dbf81ba34eaaeef8c8d1b42d
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/InstCombine/opaque-ptr.ll

  Log Message:
  -----------
  [ConstantFold] Delay fetching pointer element type

Don't do this while stipping pointer casts, instead fetch it at
the end. This improves compatibility with opaque pointers for the
case where the base object is not opaque.


Compare: https://github.com/llvm/llvm-project/compare/5dd4d0d46fb8...e638a290f7d0


More information about the All-commits mailing list