llvm.org GIT mirror llvm / 044f841
Protect PPC Altivec patterns with a predicate In preparation for the addition of other SIMD ISA extensions (such as QPX) we need to make sure that all Altivec patterns are properly predicated on having Altivec support. No functionality change intended (one test case needed to be updated b/c it assumed that Altivec intrinsics would be supported without enabling Altivec support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177152 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 7 years ago
2 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
180180
181181 //===----------------------------------------------------------------------===//
182182 // Instruction Definitions.
183
184 def HasAltivec : Predicate<"PPCSubTarget.hasAltivec()">;
185 let Predicates = [HasAltivec] in {
183186
184187 def DSS : DSS_Form<822, (outs),
185188 (ins u5imm:$ZERO0, u5imm:$STRM,u5imm:$ZERO1,u5imm:$ZERO2),
732735 (VRFIZ VRRC:$vA)>;
733736 def : Pat<(v4f32 (fnearbyint (v4f32 VRRC:$vA))),
734737 (VRFIN VRRC:$vA)>;
738
739 } // end HasAltivec
740
None ; RUN: llc < %s -march=ppc64 | grep dst | count 4
0 ; RUN: llc < %s -march=ppc64 -mattr=+altivec | grep dst | count 4
11
22 define hidden void @_Z4borkPc(i8* %image) {
33 entry: