File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
llvm/test/Transforms/FunctionAttrs Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -771,6 +771,23 @@ define i1 @captureICmpRev(ptr %x) {
771771 ret i1 %1
772772}
773773
774+ define i1 @captureICmpWrongPred (ptr %x ) {
775+ ; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
776+ ; FNATTRS-LABEL: define i1 @captureICmpWrongPred
777+ ; FNATTRS-SAME: (ptr readnone captures(address) [[X:%.*]]) #[[ATTR0]] {
778+ ; FNATTRS-NEXT: [[TMP1:%.*]] = icmp slt ptr [[X]], null
779+ ; FNATTRS-NEXT: ret i1 [[TMP1]]
780+ ;
781+ ; ATTRIBUTOR: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
782+ ; ATTRIBUTOR-LABEL: define i1 @captureICmpWrongPred
783+ ; ATTRIBUTOR-SAME: (ptr nofree readnone [[X:%.*]]) #[[ATTR0]] {
784+ ; ATTRIBUTOR-NEXT: [[TMP1:%.*]] = icmp slt ptr [[X]], null
785+ ; ATTRIBUTOR-NEXT: ret i1 [[TMP1]]
786+ ;
787+ %1 = icmp slt ptr %x , null
788+ ret i1 %1
789+ }
790+
774791define i1 @nocaptureInboundsGEPICmp (ptr %x ) {
775792; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
776793; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp
You can’t perform that action at this time.
0 commit comments