[x86] make peekThroughBitcasts() a helper function
authorSanjay Patel <spatel@rotateright.com>
Wed, 23 Mar 2016 20:16:37 +0000 (20:16 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 23 Mar 2016 20:16:37 +0000 (20:16 +0000)
commit7876f180b5fde2ecf3216a7a2800bdbd234f2fcd
tree2ddc965c50399863e6316d70d6b1cfd3bb940a81
parent85c8594056c177358ca45956e761f2b802bcc5d1
[x86] make peekThroughBitcasts() a helper function

This should be hoisted further up so it can be used in DAGCombiner and other backends,
but I'm limiting the scope in the interest of patch minimalism.

It's not quite NFC because some of the replaced code was using an 'if' check rather
than a 'while' loop, so those cases would only look through a single bitcast.

llvm-svn: 264186
llvm/lib/Target/X86/X86ISelLowering.cpp