Should work for all targets and data types. Completely unoptimized. Patch by: Aaron Watry llvm-svn: 185006