Index: src/IceInstARM32.cpp |
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp |
index b4214bc77da3477590d61fec99f2ec626321a1fd..075dd4d2c84e1eca9a24b6d6e6901be937feea1d 100644 |
--- a/src/IceInstARM32.cpp |
+++ b/src/IceInstARM32.cpp |
@@ -1864,6 +1864,39 @@ void InstARM32Vcmp::emit(const Cfg *Func) const { |
getSrc(1)->emit(Func); |
} |
+void InstARM32Vcmp::emitIAS(const Cfg *Func) const { |
+ assert(getSrcSize() == 2); |
+ const Operand *Src0 = getSrc(0); |
+ const Type Ty = Src0->getType(); |
+ const Operand *Src1 = getSrc(1); |
+ const CondARM32::Cond Cond = getPredicate(); |
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
+ if (llvm::isa<OperandARM32FlexFpZero>(Src1)) { |
+ switch (Ty) { |
+ case IceType_f32: |
+ Asm->vcmpsz(Src0, Cond); |
+ break; |
+ case IceType_f64: |
+ Asm->vcmpdz(Src0, Cond); |
+ break; |
+ default: |
+ llvm::report_fatal_error("Vcvt on non floating value"); |
+ } |
+ } else { |
+ switch (Ty) { |
+ case IceType_f32: |
+ Asm->vcmps(Src0, Src1, Cond); |
+ break; |
+ case IceType_f64: |
+ Asm->vcmpd(Src0, Src1, Cond); |
+ break; |
+ default: |
+ llvm::report_fatal_error("Vcvt on non floating value"); |
+ } |
+ } |
+ assert(!Asm->needsTextFixup()); |
+} |
+ |
void InstARM32Vcmp::dump(const Cfg *Func) const { |
if (!BuildDefs::dump()) |
return; |