| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | |
| ; RUN: opt -mtriple=x86_64-unknown-linux-gnu -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck %s | |
| ; Test that @llvm.can.load.speculatively returns false (default) on X86, | |
| ; as X86 does not provide a target-specific expansion. | |
| define i1 @can_load_speculatively_16(ptr %ptr) { | |
| ; CHECK-LABEL: @can_load_speculatively_16( | |
| ; CHECK-NEXT: ret i1 false | |
| ; | |
| %can_load = call i1 @llvm.can.load.speculatively.p0(ptr %ptr, i64 16) | |
| ret i1 %can_load | |
| } | |
| define i1 @can_load_speculatively_32(ptr %ptr) { | |
| ; CHECK-LABEL: @can_load_speculatively_32( | |
| ; CHECK-NEXT: ret i1 false | |
| ; | |
| %can_load = call i1 @llvm.can.load.speculatively.p0(ptr %ptr, i64 32) | |
| ret i1 %can_load | |
| } | |
| define i1 @can_load_speculatively_8(ptr %ptr) { | |
| ; CHECK-LABEL: @can_load_speculatively_8( | |
| ; CHECK-NEXT: ret i1 false | |
| ; | |
| %can_load = call i1 @llvm.can.load.speculatively.p0(ptr %ptr, i64 8) | |
| ret i1 %can_load | |
| } | |
| declare i1 @llvm.can.load.speculatively.p0(ptr, i64) | |