GBE: fixed a potential scalarize bug.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 24 Apr 2014 10:18:40 +0000 (18:18 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Mon, 28 Apr 2014 02:55:59 +0000 (10:55 +0800)
commitcab7428869d0532dcba90cb78ef8bb8f1679fedb
treeb5a3d695787d9ec7e2e74f7b67b3002551083305
parentd9c82a63de1b3fbf6ba0d2e1c9b8eeda52829531
GBE: fixed a potential scalarize bug.

We need to append extract instruction when do a bitcast to
a vector. Otherwise, we may trigger an assert as the extract
instruction uses a undefined vector.

After this patch, it becomes safe to do many rounds of scalarize
pass.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Tested-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/llvm/llvm_scalarize.cpp