[PATCH] D14596: [SROA] Choose more profitable type in findCommonType

Guozhi Wei via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 16:46:58 PST 2015


Carrot updated this revision to Diff 43814.
Carrot added a comment.

This updated patch improves inst combine pass to handle following bitcast case

  TyA  ->  TyB    bitcast
  PHI
  TyB  ->  TyA    bitcast

The optimized code can skip the two bitcast operations, and use TyA directly in later instructions.

A test case is also added.


http://reviews.llvm.org/D14596

Files:
  lib/Transforms/InstCombine/InstCombineCasts.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  test/Transforms/InstCombine/pr25342.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14596.43814.patch
Type: text/x-patch
Size: 6819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151231/f224973a/attachment.bin>


More information about the llvm-commits mailing list