[LLVMdev] bswap missing from all fast-isel ports including x86

reed kotler rkotler at mips.com
Mon Jan 26 16:06:53 PST 2015


I will file a bug on this.

unsigned short a = 0xaabb;
unsigned int b = 0xaabbccdd;

int main() {
   printf("%08x \n", __builtin_bswap16(a));
   printf("%08x \n", __builtin_bswap32(b));
}


  ~/llvmw/build/Debug+Asserts/bin/clang -mllvm -fast-isel -mllvm 
-fast-isel-verbose bswap1.c -S
bswap1.c:5:3: warning: implicitly declaring library function 'printf' 
with type
       'int (const char *, ...)'
   printf("%08x \n", __builtin_bswap16(a));
   ^
bswap1.c:5:3: note: include the header <stdio.h> or explicitly provide a
       declaration for 'printf'
FastISel missed call:   %3 = call i32 @llvm.bswap.i32(i32 %2)
FastISel missed call:   %1 = call i16 @llvm.bswap.i16(i16 %0)
1 warning generated.
rkotler at ubuntu-rkotler:~/testmips/rt-rk-llvm-tests/tests-c$




More information about the llvm-dev mailing list