Index: include/llvm/IR/Operator.h =================================================================== --- include/llvm/IR/Operator.h +++ include/llvm/IR/Operator.h @@ -365,13 +365,29 @@ float getFPAccuracy() const; static bool classof(const Instruction *I) { - return I->getType()->isFPOrFPVectorTy() || - I->getOpcode() == Instruction::FCmp; + switch (I->getOpcode()) { + case Instruction::FCmp: + return true; + case Instruction::ExtractElement: + case Instruction::ShuffleVector: + case Instruction::InsertElement: + return false; + default: + return I->getType()->isFPOrFPVectorTy(); + } } static bool classof(const ConstantExpr *CE) { - return CE->getType()->isFPOrFPVectorTy() || - CE->getOpcode() == Instruction::FCmp; + switch (CE->getOpcode()) { + case Instruction::FCmp: + return true; + case Instruction::ExtractElement: + case Instruction::ShuffleVector: + case Instruction::InsertElement: + return false; + default: + return CE->getType()->isFPOrFPVectorTy(); + } } static bool classof(const Value *V) { Index: test/CodeGen/X86/intersect-fma-fmf.ll =================================================================== --- test/CodeGen/X86/intersect-fma-fmf.ll +++ test/CodeGen/X86/intersect-fma-fmf.ll @@ -3,8 +3,7 @@ define float @test_x86_fma_intersection_fmf(float %a, float %b) { ; CHECK-LABEL: test_x86_fma_intersection_fmf: ; CHECK: # %bb.0: -; CHECK: vmulss {{[0-9]+}}(%esp), %xmm0, %xmm1 -; CHECK-NEXT: vaddss %xmm0, %xmm1, %xmm0 +; CHECK: vfmadd132ss {{[0-9]+}}(%esp), %xmm0, %xmm0 ; CHECK: retl %tmp8 = fmul fast float %a, %b %tmp9 = fadd fast float %tmp8, %b