commit | eb103602da8248367c11249982010b15885f8ae4 | [log] [tgz] |
---|---|---|
author | Sanjay Patel <spatel@rotateright.com> | Wed Dec 09 16:17:20 2015 +0000 |
committer | Sanjay Patel <spatel@rotateright.com> | Wed Dec 09 16:17:20 2015 +0000 |
tree | 9df4f3ebe3160dca400d98033774a9d3326e3449 | |
parent | 13f632f17efc05fca61e9cb188f51a54bfc440ed [diff] |
[InstCombine] fold bitcasts around an extractelement Example: bitcast (extractelement (bitcast <2 x float> %X to <2 x i32>), 1) to float ---> extractelement <2 x float> %X, i32 1 This is part of fixing PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 The next step will be to generalize this fold: trunc ( lshr ( bitcast X) ) -> extractelement (X) Ie, I'm hoping to replace the existing transform of: bitcast ( trunc ( lshr ( bitcast X))) added by: http://reviews.llvm.org/rL112232 with 2 less specific transforms to catch the case in the bug report. Differential Revision: http://reviews.llvm.org/D14879 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255124 91177308-0d34-0410-b5e6-96231b3b80d8