[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)
commit23356d4d64d4511d340bc6dad1464c8a3c65473b
tree0e67415d0396fbfbf8669a4de26d427949fe5ec0
parentc62ba58063c3714f36486db3bea3f79049305cb5
[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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209863 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/AutoUpgrade.cpp
test/Bitcode/x86-upgrade-avx-vbroadcast.ll [new file with mode: 0644]