[PATCH] D21246: [InstCombine] Add rule to fold away trunc of partial load

Anna Thomas via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 06:45:46 PDT 2016


anna reopened this revision.
anna added a comment.
This revision is now accepted and ready to land.

The above change caused a build break when the result type of trunc being folded did not match that of the 
prior load/store that had the trunc value.

The change was reverted in: r273703 due to fail in Chromium and sanitizer build. This was the bad RAUW assertion:
Assertion failed: New->getType() == getType() && "replaceAllUses of value with new value of different type!", file ..\lib\IR\Value.cpp, line 375

Load being used:

%138 = load float, float* %m_x.i527, align 4, !dbg !447
Trunc being replaced:

%155 = trunc i64 %140 to i32, !dbg !470

The RAUW ` return replaceInstUsesWith(CI, AvailableVal);` was missing `Builder->CreateBitOrPointerCast` of `AvailableVal`.


Repository:
  rL LLVM

http://reviews.llvm.org/D21246





More information about the llvm-commits mailing list