commit | 2dab6252a420be044d8ce8738f8de9451d5a527b | [log] [tgz] |
---|---|---|
author | Sanjay Patel <spatel@rotateright.com> | Mon Dec 14 16:16:54 2015 +0000 |
committer | Sanjay Patel <spatel@rotateright.com> | Mon Dec 14 16:16:54 2015 +0000 |
tree | c23e649c9864410d5b891ce065603bce06f92e3f | |
parent | 468daaf55e33021d3a8d10f142254bc5de18382f [diff] |
[InstCombine] fold trunc ([lshr] (bitcast vector) ) --> extractelement (PR25543) This is a fix for PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 The idea is to take the existing fold of: bitcast ( trunc ( lshr ( bitcast X))) --> extractelement (bitcast X) ( http://reviews.llvm.org/rL112232 ) And break it into less specific transforms so we'll catch more cases such as the example in the bug report: bitcast ( trunc ( lshr ( bitcast X))) --> bitcast ( extractelement (bitcast X)) --> extractelement (bitcast X) Enabling patches for this change: http://reviews.llvm.org/rL255399 (combine bitcasts) http://reviews.llvm.org/rL255433 (canonicalize extractelement(bitcast X)) Differential Revision: http://reviews.llvm.org/D15392 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255504 91177308-0d34-0410-b5e6-96231b3b80d8