From 67ea19efc36bbf8885f32e85d11f920342a7949c Mon Sep 17 00:00:00 2001 From: Alastair Reid Date: Tue, 16 Jun 2020 16:57:46 +0000 Subject: Implement fshr/fshl intrinsics Changes: - IntrinsicCleaner accepts fshr/fshl as accepted intrinsics - Executor::executeCall converts fshr/fshl to urem/zext/concat/shift/extract - Klee/main suppresses warnings about externals that are LLVM reserved (i.e., begin with "llvm.") - New test exercises 32 and 7 bit versions including oversize shift values Test values are based on LLVM's test for fshl/fshr - Changes that depend on existence of fshr/fshl are guarded by #if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0) or ; REQUIRES: geq-llvm-7.0 --- lib/Module/IntrinsicCleaner.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Module') diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp index f59192c1..a1d4fdda 100644 --- a/lib/Module/IntrinsicCleaner.cpp +++ b/lib/Module/IntrinsicCleaner.cpp @@ -62,6 +62,10 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) { case Intrinsic::vastart: case Intrinsic::vaend: case Intrinsic::fabs: +#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0) + case Intrinsic::fshr: + case Intrinsic::fshl: +#endif break; // Lower vacopy so that object resolution etc is handled by -- cgit 1.4.1