[X86] Auto-upgrade AVX1 vbroadcast intrinsics
authorAdam Nemet <anemet@apple.com>
Thu, 29 May 2014 23:35:33 +0000 (23:35 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 29 May 2014 23:35:33 +0000 (23:35 +0000)
commit39066800e9eb8fdad2e52592b344a0498e288353
treedc59b5b2e0d5ef8da4750f9bc839b8c10be604b4
parent1316a0e0e0bbf1f34d4a7ff7d57056b671673071
[X86] Auto-upgrade AVX1 vbroadcast intrinsics

They are replaced with the same IR that is generated for the
vector-initializers in avxintrin.h.

The test verifies that we get back the original instruction.  I haven't seen
this approach to be used in other auto-upgrade tests (i.e. llc + FileCheck)
but I think it's the most direct way to test this case.  I believe this should
work because llc upgrades calls during parsing.  (Other tests mostly check
that assembling and disassembling yields the upgraded IR.)

llvm-svn: 209863
llvm/lib/IR/AutoUpgrade.cpp
llvm/test/Bitcode/x86-upgrade-avx-vbroadcast.ll [new file with mode: 0644]