id
stringlengths
10
66
text
stringlengths
1
641k
source
stringclasses
1 value
added
stringdate
2025-04-01 17:48:26
2025-04-01 17:51:04
metadata
dict
commitpackft-llvm-655
Add an interesting case we already get right. ; RUN: llvm-link -S %s -o - | FileCheck %s define void @f() { ret void } ; We lazy link @v, which causes llvm.global_ctors to have the corresponding ; entry. @v = linkonce global i8 42 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }] ; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
Data Provenance Initiative
2025-04-01T17:48:26.626221
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-656
Add explicit test for PR4280. ; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin10 ; PR4280 define i32 @__fixunssfsi(float %a) nounwind readnone { entry: %0 = fcmp ult float %a, 0x41E0000000000000 ; <i1> [#uses=1] br i1 %0, label %bb1, label %bb bb: ; preds = %entry ret i32 1 bb1: ; preds = %entry ret i32 0 }
Data Provenance Initiative
2025-04-01T17:48:26.626225
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-657
Add missing test case for previous commit. ; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort -verify-machineinstrs < %s | FileCheck %s ; Test that we don't abort fast-isle for ret define <8 x i8> @ret_v8i8(<8 x i8> %a, <8 x i8> %b) { ; CHECK-LABEL: ret_v8i8 ; CHECK: add.8b v0, v0, v1 %1 = add <8 x i8> %a, %b ret <8 x i8> %1 }
Data Provenance Initiative
2025-04-01T17:48:26.626228
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-658
Add a regression test for struct return lowering ; RUN: llc < %s -march=avr | FileCheck %s ; This test ensures that the backend can lower returns of struct values. ; It does not check how these are lowered. ; ; In the past, this code used to return an error ; ; Assertion `InVals.size() == Ins.size() && "LowerFormalArguments didn't emit the correct number of values!"' failed. ; ; This feature was first implemented in r325474. declare i8 @do_something(i8 %val) ; CHECK-LABEL: main define { i1, i8 } @main(i8) #2 { entry: %1 = call zeroext i8 @do_something(i8 zeroext %0) %2 = insertvalue { i1, i8 } { i1 true, i8 undef }, i8 %1, 1 ret { i1, i8 } %2 }
Data Provenance Initiative
2025-04-01T17:48:26.626232
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-659
Add a test for the fix in revision 91009. ; RUN: opt < %s -licm -disable-output define void @foo (i8* %v) { entry: br i1 undef, label %preheader, label %return preheader: br i1 undef, label %loop, label %return loop: indirectbr i8* undef, [label %preheader, label %stuff] stuff: %0 = load i8* undef, align 1 br label %loop return: ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626236
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-660
Add test to cover accurate-sample-profile. ; For SamplePGO, if -accurate-sample-profile is specified, cold callsite ; heuristics should be honored if the caller has no profile. ; RUN: opt < %s -inline -S -inline-cold-callsite-threshold=0 | FileCheck %s ; RUN: opt < %s -inline -S -inline-cold-callsite-threshold=0 -accurate-sample-profile | FileCheck %s --check-prefix=ACCURATE define i32 @callee(i32 %x) { %x1 = add i32 %x, 1 %x2 = add i32 %x1, 1 %x3 = add i32 %x2, 1 call void @extern() call void @extern() ret i32 %x3 } define i32 @caller(i32 %y1) { ; CHECK-NOT: call i32 @callee ; ACCURATE: call i32 @callee %y2 = call i32 @callee(i32 %y1) ret i32 %y2 } declare void @extern() !llvm.module.flags = !{!1} !1 = !{i32 1, !"ProfileSummary", !2} !2 = !{!3, !4, !5, !6, !7, !8, !9, !10} !3 = !{!"ProfileFormat", !"SampleProfile"} !4 = !{!"TotalCount", i64 10000} !5 = !{!"MaxCount", i64 1000} !6 = !{!"MaxInternalCount", i64 1} !7 = !{!"MaxFunctionCount", i64 1000} !8 = !{!"NumCounts", i64 3} !9 = !{!"NumFunctions", i64 3} !10 = !{!"DetailedSummary", !11} !11 = !{!12, !13, !14} !12 = !{i32 10000, i64 100, i32 1} !13 = !{i32 999000, i64 100, i32 1} !14 = !{i32 999999, i64 1, i32 2}
Data Provenance Initiative
2025-04-01T17:48:26.626239
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-661
Test that we fail to flatten CFG after forming @llvm.umul.with.overflow ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -simplifycfg -S | FileCheck %s ; This is checking that the multiplication does overflow, with a leftover ; guard against division-by-zero that was needed before InstCombine ; produced llvm.umul.with.overflow. define i1 @will_overflow(i64 %size, i64 %nmemb) { ; CHECK-LABEL: @will_overflow( ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[SIZE:%.*]], 0 ; CHECK-NEXT: br i1 [[CMP]], label [[LAND_END:%.*]], label [[LAND_RHS:%.*]] ; CHECK: land.rhs: ; CHECK-NEXT: [[UMUL:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[SIZE]], i64 [[NMEMB:%.*]]) ; CHECK-NEXT: [[UMUL_OV:%.*]] = extractvalue { i64, i1 } [[UMUL]], 1 ; CHECK-NEXT: [[UMUL_NOT_OV:%.*]] = xor i1 [[UMUL_OV]], true ; CHECK-NEXT: br label [[LAND_END]] ; CHECK: land.end: ; CHECK-NEXT: [[TMP0:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ [[UMUL_NOT_OV]], [[LAND_RHS]] ] ; CHECK-NEXT: ret i1 [[TMP0]] ; entry: %cmp = icmp eq i64 %size, 0 br i1 %cmp, label %land.end, label %land.rhs land.rhs: ; preds = %entry %umul = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %size, i64 %nmemb) %umul.ov = extractvalue { i64, i1 } %umul, 1 %umul.not.ov = xor i1 %umul.ov, true br label %land.end land.end: ; preds = %land.rhs, %entry %0 = phi i1 [ true, %entry ], [ %umul.not.ov, %land.rhs ] ret i1 %0 } ; Function Attrs: nounwind readnone speculatable declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #0
Data Provenance Initiative
2025-04-01T17:48:26.626244
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-662
Add generic test for add with overflow. ; RUN: llvm-as < %s | llc @ok = internal constant [4 x i8] c"%d\0A\00" @no = internal constant [4 x i8] c"no\0A\00" define i1 @foo(i32 %v1, i32 %v2) nounwind { entry: %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2) %sum = extractvalue {i32, i1} %t, 0 %obit = extractvalue {i32, i1} %t, 1 br i1 %obit, label %overflow, label %normal normal: %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind ret i1 true overflow: %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind ret i1 false } declare i32 @printf(i8*, ...) nounwind declare {i32, i1} @llvm.sadd.with.overflow.i32(i32, i32)
Data Provenance Initiative
2025-04-01T17:48:26.626247
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-663
Make sure that setcc is implemented for bools. ; SetCC on boolean values was not implemented! ; RUN: if as < %s | opt -constprop -die | dis | grep 'set' ; RUN: then exit 1 ; RUN: else exit 0 ; RUN: fi bool "test1"() { %A = setle bool true, false %B = setge bool true, false %C = setlt bool false, true %D = setgt bool true, false %E = seteq bool false, false %F = setne bool false, true %G = and bool %A, %B %H = and bool %C, %D %I = and bool %E, %F %J = and bool %G, %H %K = and bool %I, %J ret bool %K }
Data Provenance Initiative
2025-04-01T17:48:26.626251
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-664
Add a testcase for PR2831. ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep getelementptr ; PR2831 ; Don't raise arbitrary inttoptr+arithmetic+ptrtoint to getelementptr. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" define i32 @main(i32 %argc, i8** %argv) nounwind { entry: %0 = ptrtoint i8** %argv to i32 ; <i32> [#uses=1] %1 = add i32 %0, 1 ; <i32> [#uses=1] ret i32 %1 } ; This testcase could theoretically be optimized down to return zero, ; but for now being conservative with ptrtoint/inttoptr is fine. define i32 @a() nounwind { entry: %b = alloca i32 ; <i32*> [#uses=3] %a = alloca i32 ; <i32*> [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 1, i32* %b, align 4 %a1 = ptrtoint i32* %a to i32 ; <i32> [#uses=1] %b4 = ptrtoint i32* %b to i32 ; <i32> [#uses=1] %a7 = ptrtoint i32* %a to i32 ; <i32> [#uses=1] %0 = sub i32 %b4, %a7 ; <i32> [#uses=1] %1 = add i32 %a1, %0 ; <i32> [#uses=1] %2 = inttoptr i32 %1 to i32* ; <i32*> [#uses=1] store i32 0, i32* %2, align 4 %3 = load i32* %b, align 4 ; <i32> [#uses=1] br label %return return: ; preds = %entry ret i32 %3 }
Data Provenance Initiative
2025-04-01T17:48:26.626255
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-665
Add a test case for abstract parameter and result types in function definitions. The assembler should produce an error on this input. ; The assembler should catch an undefined argument type . ; RUN: llvm-as < %s -o /dev/null -f 2>&1 | grep "Reference to abstract argument" ; %typedef.bc_struct = type opaque implementation ; Functions: define bool %someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) { ret bool true }
Data Provenance Initiative
2025-04-01T17:48:26.626258
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-666
Fix an all too common form of the 'Found global types that are not compatible' warning ; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING void %test() { call int(...)* %test() ret void } declare int %test(...)
Data Provenance Initiative
2025-04-01T17:48:26.626261
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-667
Test for FixFDIVSQRT erratum fix. ; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -mattr=+fixallfdivsqrt -o - | FileCheck %s ; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s ; CHECK-LABEL: test_1 ; CHECK: nop ; CHECK: nop ; CHECK: fdivd ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop define double @test_1(double* byval %a, double* byval %b) { entry: %0 = load double, double* %a, align 8 %1 = load double, double* %b, align 8 %res = fdiv double %0, %1 ret double %res } declare double @llvm.sqrt.f64(double) nounwind readonly ; CHECK-LABEL: test_2 ; CHECK: nop ; CHECK: nop ; CHECK: nop ; CHECK: nop ; CHECK: nop ; CHECK: fsqrtd ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop ; CHECK-NEXT: nop define double @test_2(double* byval %a) { entry: %0 = load double, double* %a, align 8 %1 = call double @llvm.sqrt.f64(double %0) nounwind ret double %1 }
Data Provenance Initiative
2025-04-01T17:48:26.626265
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-668
Add testcase that checks that DeadArgElim doesn't touch stuff it shouldn't touch. ; RUN: llvm-as < %s | opt -deadargelim | llvm-dis > %t ; RUN: cat %t | grep {define internal \{ \} @test} ; RUN: cat %t | grep {define internal \{ i32 \} @test} ; RUN: cat %t | grep {define internal \<\{ i32, i32 \}\> @test} ; Check if the pass doesn't modify anything that doesn't need changing. We feed ; an unused argument to each function to lure it into changing _something_ about ; the function and then changing to much. ; This checks if the struct retval isn't changed into a void define internal { } @test(i32 %DEADARG1) { ret { } { } } ; This checks if the struct retval isn't removed define internal {i32} @test1(i32 %DEADARG1) { ret { i32 } { i32 1 } } ; This checks if the struct doesn't get non-packed define internal <{ i32, i32 }> @test2(i32 %DEADARG1) { ret <{ i32, i32 }> <{ i32 1, i32 2 }> } ; We use this external function to make sure the return values don't become dead declare void @user({ }, { i32 }, <{ i32, i32 }>) define void @caller() { %A = call { } @test(i32 0) %B = call { i32 } @test1(i32 1) %C = call <{ i32, i32 }> @test2(i32 2) call void @user({ } %A, { i32 } %B, <{ i32, i32 }> %C) ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626269
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-669
Add another test case for instruction scheduling. ; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | grep 'asm-printer' | grep 7 int %g(int %a, int %b) { %tmp.1 = shl int %b, ubyte 1 %tmp.3 = add int %tmp.1, %a %tmp.5 = mul int %tmp.3, %a %tmp.8 = mul int %b, %b %tmp.9 = add int %tmp.5, %tmp.8 ret int %tmp.9 }
Data Provenance Initiative
2025-04-01T17:48:26.626272
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-670
Add a testcase where GVNPRE what getting confused by a loop. ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis define fastcc void @compute_max_score_1() { entry: %tmp7 = sub i32 0, 0 ; <i32> [#uses=0] br label %bb bb: ; preds = %bb212, %entry %indvar29 = phi i32 [ 0, %entry ], [ %indvar.next30, %bb212 ] ; <i32> [#uses=2] %j.01.0 = sub i32 %indvar29, 0 ; <i32> [#uses=0] br label %cond_next166 cond_next166: ; preds = %cond_next166, %bb br i1 false, label %bb212, label %cond_next166 bb212: ; preds = %cond_next166 %indvar.next30 = add i32 %indvar29, 1 ; <i32> [#uses=1] br i1 false, label %return, label %bb return: ; preds = %bb212 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626276
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-671
Add a testcase for PR25951 ; RUN: llc -o - %s | FileCheck %s ; This tests for the problem originally reported in http://llvm.org/PR25951 target triple = "i686-unknown-linux-gnu" @b = common global i8 0, align 1 @c = common global i32 0, align 4 @a = common global i8 0, align 1 @d = common global i8 0, align 1 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; CHECK-LABEL: func: ; This tests whether eax is properly saved/restored around the lahf/sahf ; instruction sequences. define i32 @func() { entry: %bval = load i8, i8* @b %inc = add i8 %bval, 1 store i8 %inc, i8* @b %cval = load i32, i32* @c %inc1 = add nsw i32 %cval, 1 store i32 %inc1, i32* @c %aval = load i8, i8* @a %inc2 = add i8 %aval, 1 store i8 %inc2, i8* @a ; Copy flags produced by the incb of %inc1 to a register, need to save+restore ; eax around it. The flags will be reused by %tobool. ; CHECK: pushl %eax ; CHECK: seto %al ; CHECK: lahf ; CHECK: movl %eax, [[REG:%[a-z]+]] ; CHECK: popl %eax %cmp = icmp eq i8 %aval, %bval %conv5 = zext i1 %cmp to i8 store i8 %conv5, i8* @d %tobool = icmp eq i32 %inc1, 0 ; We restore flags with an 'addb, sahf' sequence, need to save+restore eax ; around it. ; CHECK: pushl %eax ; CHECK: movl [[REG]], %eax ; CHECK: addb $127, %al ; CHECK: sahf ; CHECK: popl %eax br i1 %tobool, label %if.end, label %if.then if.then: %conv6 = sext i8 %inc to i32 %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %conv6) br label %if.end if.end: ret i32 0 } declare i32 @printf(i8* nocapture readonly, ...)
Data Provenance Initiative
2025-04-01T17:48:26.626280
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-672
Add positive test for sqrt "partial inlining". NFC. ; RUN: opt -S -partially-inline-libcalls < %s | FileCheck %s ; RUN: opt -S -passes=partially-inline-libcalls < %s | FileCheck %s target triple = "x86_64-unknown-linux-gnu" define float @f(float %val) { ; CHECK: @f ; CHECK: entry: ; CHECK-NEXT: %[[RES:.+]] = tail call float @sqrtf(float %val) #0 ; CHECK-NEXT: %[[CMP:.+]] = fcmp oeq float %[[RES]], %[[RES]] ; CHECK-NEXT: br i1 %[[CMP]], label %[[EXIT:.+]], label %[[CALL:.+]] ; CHECK: [[CALL]]: ; CHECK-NEXT: %[[RES2:.+]] = tail call float @sqrtf(float %val){{$}} ; CHECK-NEXT: br label %[[EXIT]] ; CHECK: [[EXIT]]: ; CHECK-NEXT: %[[RET:.+]] = phi float [ %[[RES]], %entry ], [ %[[RES2]], %[[CALL]] ] ; CHECK-NEXT: ret float %[[RET]] entry: %res = tail call float @sqrtf(float %val) ret float %res } declare float @sqrtf(float)
Data Provenance Initiative
2025-04-01T17:48:26.626284
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-673
Make sure to not accidentally get a bogus tail marker ; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep tail implementation declare void %bar(int*) internal void %foo(int* %P) { ;; to be inlined tail call void %bar(int* %P) ret void } void %caller() { %A = alloca int call void %foo(int* %A) ;; not a tail call ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626288
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-674
Add a replacement for 2009-02-12-GEPNoalias.ll that works without -debug. ; RUN: llvm-as < %s | opt -aa-eval -basicaa |& grep {0 no alias} declare noalias i32* @noalias() define void @test(i32 %x) { %a = call i32* @noalias() %b = getelementptr i32* %a, i32 %x ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626292
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-675
Make sure that pure calls don't kill loads ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub declare int %strlen(sbyte*) declare void %use(int %X) sbyte %test(sbyte* %P, sbyte* %Q) { %A = load sbyte* %Q %X = call int %strlen(sbyte* %P) %B = load sbyte* %Q ;; CSE with A. call void %use(int %X) ;; make strlen not dead %C = sub sbyte %A, %B ret sbyte %C }
Data Provenance Initiative
2025-04-01T17:48:26.626295
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-676
Add a test case for shl of APInt integers > 64 bits by 0 shift amount. ; RUN: llvm-as %s -f -o %t.bc ; RUN: lli -force-interpreter=true %t.bc | tee %t.out | grep 10 ; Test that APInt shift left works when bitwidth > 64 and shiftamt == 0 declare i32 @putchar(i32) define void @putBit(i65 %x, i65 %bitnum) { %tmp1 = shl i65 1, %bitnum %tmp2 = and i65 %x, %tmp1 %cond = icmp ne i65 %tmp2, 0 br i1 %cond, label %cond_true, label %cond_false cond_true: call i32 @putchar(i32 49) br label %cond_next cond_false: call i32 @putchar(i32 48) br label %cond_next cond_next: ret void } define i32 @main() { call void @putBit(i65 1, i65 0) call void @putBit(i65 0, i65 0) ret i32 0 }
Data Provenance Initiative
2025-04-01T17:48:26.626299
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-677
Add test that demonstrates buggy behavior on term folding of LoopSimplifyCFG ; This is currently failing because of bug in LoopSimplifyCFG. It does not update ; duplicating Phi inputs properly. ; XFAIL: * ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -loop-simplifycfg -debug-only=loop-simplifycfg -verify-loop-info -verify-dom-info -verify-loop-lcssa 2>&1 < %s | FileCheck %s ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -passes='require<domtree>,loop(simplify-cfg)' -debug-only=loop-simplifycfg -verify-loop-info -verify-dom-info -verify-loop-lcssa 2>&1 < %s | FileCheck %s ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -loop-simplifycfg -enable-mssa-loop-dependency=true -verify-memoryssa -debug-only=loop-simplifycfg -verify-loop-info -verify-dom-info -verify-loop-lcssa 2>&1 < %s | FileCheck %s target datalayout = "P40" @a = external global i16, align 1 ; CHECK-LABEL: @f1( define void @f1(i1 %cond) { entry: br label %for.cond for.cond: br i1 %cond, label %if.then, label %for.inc if.then: %0 = load i16, i16* @a, align 1 %tobool = icmp ne i16 %0, 0 br i1 %tobool, label %for.inc, label %for.inc for.inc: %c.1 = phi i16 [ 2, %if.then ], [ 2, %if.then ], [ 1, %for.cond ] br label %for.cond }
Data Provenance Initiative
2025-04-01T17:48:26.626303
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-678
Add this test back for Darwin. ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin9 | grep ^__Z1fv.eh ; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 | grep ^__Z1fv.eh define void @_Z1fv() { entry: br label %return return: ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626307
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-679
Test case for a SETCC / BRCOND folding bug. ; RUN: llvm-as < %s | llc target endian = little target pointersize = 32 %struct.node_t = type { double*, %struct.node_t*, %struct.node_t**, double**, double*, int, int } implementation ; Functions: void %main() { entry: br bool false, label %then.2.i, label %endif.2.i then.2.i: ; preds = %entry br label %dealwithargs.exit endif.2.i: ; preds = %entry br bool false, label %then.3.i, label %dealwithargs.exit then.3.i: ; preds = %endif.2.i br label %dealwithargs.exit dealwithargs.exit: ; preds = %then.3.i, %endif.2.i, %then.2.i %n_nodes.4 = phi int [ 64, %then.3.i ], [ 64, %then.2.i ], [ 64, %endif.2.i ] ; <int> [#uses=1] %tmp.14.i1134.i.i = setgt int %n_nodes.4, 1 ; <bool> [#uses=2] br bool %tmp.14.i1134.i.i, label %no_exit.i12.i.i, label %fill_table.exit22.i.i no_exit.i12.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit br bool false, label %fill_table.exit22.i.i, label %no_exit.i12.i.i fill_table.exit22.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit %cur_node.0.i8.1.i.i = phi %struct.node_t* [ undef, %dealwithargs.exit ], [ null, %no_exit.i12.i.i ] ; <%struct.node_t*> [#uses=0] br bool %tmp.14.i1134.i.i, label %no_exit.i.preheader.i.i, label %make_tables.exit.i no_exit.i.preheader.i.i: ; preds = %fill_table.exit22.i.i ret void make_tables.exit.i: ; preds = %fill_table.exit22.i.i ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626311
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-680
Add a missing test for r134882. ; RUN: llc < %s | FileCheck %s target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin10" ; CHECK-NOT: MergedGlobals @a = internal unnamed_addr global i1 false @b = internal global [64 x i8] zeroinitializer, align 64
Data Provenance Initiative
2025-04-01T17:48:26.626314
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-681
Add a test for non most dominating leader. ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py @b = external global i32, align 4 @a = external global i32, align 4 define void @tinkywinky() { entry: br label %l1 l1.loopexit: %g.223.lcssa = phi i32* [ @b, %for.body3 ] br label %l1 l1: %g.0 = phi i32* [ undef, %entry ], [ %g.223.lcssa, %l1.loopexit ] %f.0 = phi i32* [ @b, %entry ], [ @a, %l1.loopexit ] br label %for.cond for.cond.loopexit: br label %for.cond for.cond: %g.1 = phi i32* [ %g.0, %l1 ], [ %g.4, %for.cond.loopexit ] %f.1 = phi i32* [ %f.0, %l1 ], [ %f.2, %for.cond.loopexit ] br i1 undef, label %for.end14, label %for.cond1.preheader for.cond1.preheader: br label %for.body3 for.cond1: br label %l2 for.body3: br i1 undef, label %for.cond1, label %l1.loopexit l2: %g.4 = phi i32* [ %g.1, %for.end14 ], [ @a, %for.cond1 ] %f.2 = phi i32* [ %f.1, %for.end14 ], [ @a, %for.cond1 ] br label %for.inc for.inc: br i1 false, label %for.cond.loopexit, label %for.inc for.end14: br label %l2 }
Data Provenance Initiative
2025-04-01T17:48:26.626318
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-682
Check opaque, abstract, and recursive type handling ; This test case is used to test opaque type processing, forward references, ; and recursive types. Oh my. ; %SQ1 = type { int } %ITy = type opaque %SQ2 = type { %ITy } %ITy = type int %CCC = type { \2* } %BBB = type { \2*, \2 * } %AAA = type { \2*, {\2*}, [{\2*}], {[1x{\2*}]} } ; Test numbered types type %CCC type %BBB %Composite = type { %0, %1 } ; Test simple opaque type resolution... %intty = type opaque %intty = type int ; Perform a simple forward reference... %ty1 = type { %ty2, int } %ty2 = type float ; Do a recursive type... %list = type { %list * } %listp = type { %listp } * ; Do two mutually recursive types... %TyA = type { %ty2, %TyB * } %TyB = type { double, %TyA * } ; A complex recursive type... %Y = type { {%Y*}, %Y* } %Z = type { { %Z * }, [%Z] *, {{{ %Z * }}} } ; More ridiculous test cases... %A = type [ 123x %A*] %M = type %M (%M, %M) * %P = type %P* ; Recursive ptrs %u = type %v* %v = type %u* ; Test the parser for unnamed recursive types... %P1 = type \1 * %Y1 = type { { \3 * }, \2 * } %Z1 = type { { \3 * }, [\3] *, { { { \5 * } } } } implementation
Data Provenance Initiative
2025-04-01T17:48:26.626322
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-683
Add test case for PR30511 and r282341. ; RUN: llc < %s -mtriple=x86_64-pc-linux-gnu | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" define i64 @PR30511(<2 x double> %a) { ; CHECK: # BB#0: ; CHECK-NEXT: addpd {{.*}}(%rip), %xmm0 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3] ; CHECK-NEXT: cvtdq2pd %xmm0, %xmm0 ; CHECK-NEXT: mulpd {{.*}}(%rip), %xmm0 ; CHECK-NEXT: movd %xmm0, %rax ; CHECK-NEXT: retq %1 = fadd <2 x double> %a, <double 0x4338000000000000, double 0x4338000000000000> %2 = bitcast <2 x double> %1 to <2 x i64> %3 = trunc <2 x i64> %2 to <2 x i32> %4 = sitofp <2 x i32> %3 to <2 x double> %5 = fmul <2 x double> %4, <double 0x3E76800000000000, double 0x3E76800000000000> %6 = extractelement <2 x double> %5, i32 0 %7 = bitcast double %6 to i64 ret i64 %7 }
Data Provenance Initiative
2025-04-01T17:48:26.626325
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-684
Add some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC. ; RUN: opt %s -simplifycfg -S | FileCheck %s declare i32 @f(i32) define i32 @basic(i32 %x) { ; CHECK-LABEL: @basic ; CHECK: x.off = add i32 %x, -5 ; CHECK: %switch = icmp ult i32 %x.off, 3 ; CHECK: br i1 %switch, label %a, label %default entry: switch i32 %x, label %default [ i32 5, label %a i32 6, label %a i32 7, label %a ] default: %0 = call i32 @f(i32 0) ret i32 %0 a: %1 = call i32 @f(i32 1) ret i32 %1 } define i32 @unreachable(i32 %x) { ; CHECK-LABEL: @unreachable ; CHECK: x.off = add i32 %x, -5 ; CHECK: %switch = icmp ult i32 %x.off, 3 ; CHECK: br i1 %switch, label %a, label %b entry: switch i32 %x, label %unreachable [ i32 5, label %a i32 6, label %a i32 7, label %a i32 10, label %b i32 20, label %b i32 30, label %b i32 40, label %b ] unreachable: unreachable a: %0 = call i32 @f(i32 0) ret i32 %0 b: %1 = call i32 @f(i32 1) ret i32 %1 }
Data Provenance Initiative
2025-04-01T17:48:26.626329
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-685
Debug Info: Fix the SDLoc propagation for a DAGCombiner rule ; RUN: llc -O0 < %s -mtriple=x86_64-unknown | FileCheck %s ; This was extracted from a swift debugger stepping testcase and checks that the ; fold (zext (load x)) -> (zext (truncate (zextload x))) ; rule propagates the SDLoc of the load to the zextload. ; CHECK: .loc {{.*}} main.swift:100 ; CHECK-NOT: .loc ; CHECK: .loc {{.*}} main.swift:200 ; CHECK-NOT: .loc ; CHECK: .loc {{.*}} main.swift:300 ; CHECK-NOT: .loc declare void @foo(double) define i32 @zext_load(i32* %arg) !dbg !30 { %1 = bitcast i32* %arg to i8* %2 = getelementptr inbounds i8, i8* %1, i32 1 %3 = load i8, i8* %2, align 1, !dbg !100 %4 = uitofp i8 %3 to double, !dbg !200 call void @foo(double %4), !dbg !200 %5 = zext i8 %3 to i32, !dbg !300 ret i32 %5 } !llvm.dbg.cu = !{!1} !llvm.module.flags = !{!0} !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, isOptimized: false, emissionKind: FullDebug) !2 = !DIModule(scope: null, name: "test", includePath: "", isysroot: "/") !3 = !DIFile(filename: "main.swift", directory: "/") !30 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !31, isLocal: false, isDefinition: true, isOptimized: false, unit: !1) !31 = !DISubroutineType(types: !32) !32 = !{} !100 = !DILocation(line: 100, scope: !30) !200 = !DILocation(line: 200, scope: !30) !300 = !DILocation(line: 300, scope: !30)
Data Provenance Initiative
2025-04-01T17:48:26.626333
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-686
Add a testcase for a function we cannot legally promote the argument of. ; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | not grep 'load int\* null' implementation internal int %callee(bool %C, int* %P) { br bool %C, label %T, label %F T: ret int 17 F: %X = load int* %P ret int %X } int %foo() { %X = call int %callee(bool true, int* null) ret int %X }
Data Provenance Initiative
2025-04-01T17:48:26.626337
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-687
Add a testcase for 155440 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s ; Make sure that we don't match this shuffle using the vpblendw instruction. ; The mask for the vpblendw instruction needs to be identical for both halves ; of the YMM. ; CHECK: blendw1 ; CHECK-NOT: vpblendw ; CHECK: ret define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline { %t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> ret <16 x i16> %t }
Data Provenance Initiative
2025-04-01T17:48:26.626341
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-688
Add a test case for opt -instcombine bug fix in revision 52003. ; RUN: llvm-as < %s | opt -instcombine define i65 @foo(i65 %x) nounwind { entry: %tmp2 = ashr i65 %x, 65 ; <i65> [#uses=1] ret i65 %tmp2 }
Data Provenance Initiative
2025-04-01T17:48:26.626344
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-689
Add a test for CodeGenPrepare's ability to look through PHI nodes when performing addressing mode folding, introduced in r119853. ; RUN: llc -march=arm < %s | FileCheck %s ; <rdar://problem/8686347> define i32 @test1(i1 %a, i32* %b) { ; CHECK: test1 entry: br i1 %a, label %lblock, label %rblock lblock: %lbranch = getelementptr i32* %b, i32 1 br label %end rblock: %rbranch = getelementptr i32* %b, i32 1 br label %end end: ; CHECK: ldr r0, [r1, #4] %gep = phi i32* [%lbranch, %lblock], [%rbranch, %rblock] %r = load i32* %gep ; CHECK-NEXT: bx lr ret i32 %r }
Data Provenance Initiative
2025-04-01T17:48:26.626348
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-690
Add a 64-bit test case. ; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2 %lens = external global ubyte* %vals = external global int* int %test(int %i) { %tmp = load ubyte** %lens %tmp1 = getelementptr ubyte* %tmp, int %i %tmp = load ubyte* %tmp1 %tmp2 = cast ubyte %tmp to int %tmp3 = load int** %vals %tmp5 = sub int 1, %tmp2 %tmp6 = getelementptr int* %tmp3, int %tmp5 %tmp7 = load int* %tmp6 ret int %tmp7 }
Data Provenance Initiative
2025-04-01T17:48:26.626351
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-691
Add test for constructor and destructor sections. ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -o %t.s -f && ; RUN: grep '\.section \.ctors,"aw",.progbits' %t.s | grep % && ; RUN: grep '\.section \.dtors,"aw",.progbits' %t.s | grep % %llvm.global_ctors = appending global [1 x { int, void ()* }] [ { int, void ()* } { int 65535, void ()* %__mf_init } ] ; <[1 x { int, void ()* }]*> [#uses=0] %llvm.global_dtors = appending global [1 x { int, void ()* }] [ { int, void ()* } { int 65535, void ()* %__mf_fini } ] ; <[1 x { int, void ()* }]*> [#uses=0] void %__mf_init() { entry: ret void } void %__mf_fini() { entry: ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626355
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-692
Test cases for 64-bit multiplication and division. ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s define i64 @m0(i64 %a0, i64 %a1) nounwind readnone { entry: ; CHECK: dmult ; CHECK: mflo %mul = mul i64 %a1, %a0 ret i64 %mul } define i64 @d0(i64 %a0, i64 %a1) nounwind readnone { entry: ; CHECK: ddivu ; CHECK: mflo %div = udiv i64 %a0, %a1 ret i64 %div } define i64 @d1(i64 %a0, i64 %a1) nounwind readnone { entry: ; CHECK: ddiv ; CHECK: mflo %div = sdiv i64 %a0, %a1 ret i64 %div } define i64 @d2(i64 %a0, i64 %a1) nounwind readnone { entry: ; CHECK: ddivu ; CHECK: mfhi %rem = urem i64 %a0, %a1 ret i64 %rem } define i64 @d3(i64 %a0, i64 %a1) nounwind readnone { entry: ; CHECK: ddiv ; CHECK: mfhi %rem = srem i64 %a0, %a1 ret i64 %rem }
Data Provenance Initiative
2025-04-01T17:48:26.626358
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-693
Add a test case for r176066. ; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-apple-darwin10 ; Requires: Asserts ; Previously, this would cause an assert. define i31 @t1(i31 %a, i31 %b, i31 %c) { entry: %add = add nsw i31 %b, %a %add1 = add nsw i31 %add, %c ret i31 %add1 }
Data Provenance Initiative
2025-04-01T17:48:26.626361
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-694
Add test case for r210282 commit ; RUN: opt < %s -instcombine -S | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64" target triple = "powerpc64le-unknown-linux-gnu" define <16 x i8> @foo() nounwind ssp { ; CHECK: @foo ;; Arguments are {0,1,...,15},{16,17,...,31},{30,28,26,...,0} %1 = call <4 x i32> @llvm.ppc.altivec.vperm(<4 x i32> <i32 50462976, i32 117835012, i32 185207048, i32 252579084>, <4 x i32> <i32 319951120, i32 387323156, i32 454695192, i32 522067228>, <16 x i8> <i8 30, i8 28, i8 26, i8 24, i8 22, i8 20, i8 18, i8 16, i8 14, i8 12, i8 10, i8 8, i8 6, i8 4, i8 2, i8 0>) %2 = bitcast <4 x i32> %1 to <16 x i8> ret <16 x i8> %2 ;; Revised arguments are {16,17,...31},{0,1,...,15},{1,3,5,...,31} ;; optimized into the following: ; CHECK: ret <16 x i8> <i8 17, i8 19, i8 21, i8 23, i8 25, i8 27, i8 29, i8 31, i8 1, i8 3, i8 5, i8 7, i8 9, i8 11, i8 13, i8 15> } declare <4 x i32> @llvm.ppc.altivec.vperm(<4 x i32>, <4 x i32>, <16 x i8>)
Data Provenance Initiative
2025-04-01T17:48:26.626365
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-695
Add test for my last commit. ; The purpose of this test is to verify that we do not produce unneeded ; relocations when symbols are in the same section and we know their offset. ; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s ; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | coff-dump.py | FileCheck %s define void @foo() { e: br label %i i: br label %i } define void @bar() { e: br label %i i: br label %i } define void @baz() { e: call void @baz() ret void } ; CHECK: Sections = [ ; CHECK-NOT: NumberOfRelocations = {{[^0]}} ; CHECK: Symbols = [
Data Provenance Initiative
2025-04-01T17:48:26.626369
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-696
Include a basic simple test. ; RUN: if as < %s | opt -globaldce | dis | grep global ; RUN: then exit 1 ; RUN: else exit 0 ; RUN: fi %X = uninitialized global int %Y = internal global int 7
Data Provenance Initiative
2025-04-01T17:48:26.626373
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-697
Add a testcase for my last checkin. ; RUN: llc < %s -O0 -mtriple=thumbv7-apple-darwin %union.anon = type { <16 x i32> } @__md0 = external global [137 x i8] define internal void @stretch(<4 x i8> addrspace(1)* %src, <4 x i8> addrspace(1)* %dst, i32 %width, i32 %height, i32 %iLS, i32 %oLS, <2 x float> %c, <4 x float> %param) nounwind { entry: ret void } define internal i32 @_Z13get_global_idj(i32 %dim) nounwind ssp { entry: ret i32 undef } define void @wrap(i8 addrspace(1)* addrspace(1)* %arglist, i32 addrspace(1)* %gtid) nounwind ssp { entry: call void @stretch(<4 x i8> addrspace(1)* undef, <4 x i8> addrspace(1)* undef, i32 undef, i32 undef, i32 undef, i32 undef, <2 x float> undef, <4 x float> undef) ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626376
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-698
Add a test case for r146900. ; RUN: llc -march=mipsel < %s | FileCheck %s define i32 @foo0() nounwind readnone { entry: ; CHECK: foo0 ; CHECK: lui $[[R0:[0-9]+]], 4660 ; CHECK: ori ${{[0-9]+}}, $[[R0]], 22136 ret i32 305419896 } define i32 @foo1() nounwind readnone { entry: ; CHECK: foo1 ; CHECK: lui ${{[0-9]+}}, 4660 ; CHECK-NOT: ori ret i32 305397760 } define i32 @foo2() nounwind readnone { entry: ; CHECK: foo2 ; CHECK: addiu ${{[0-9]+}}, $zero, 4660 ret i32 4660 } define i32 @foo17() nounwind readnone { entry: ; CHECK: foo17 ; CHECK: addiu ${{[0-9]+}}, $zero, -32204 ret i32 -32204 } define i32 @foo18() nounwind readnone { entry: ; CHECK: foo18 ; CHECK: ori ${{[0-9]+}}, $zero, 33332 ret i32 33332 }
Data Provenance Initiative
2025-04-01T17:48:26.626380
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-699
Add a missing test case for r258847. ; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux < %s | FileCheck %s -check-prefix=CHECK ; Test if the negation of the non-equality check between floating points are ; translated to jnp followed by jne. ; CHECK: jne ; CHECK-NEXT: jnp define void @foo(float %f) { entry: %cmp = fcmp une float %f, 0.000000e+00 br i1 %cmp, label %if.then, label %if.end if.then: tail call void @a() br label %if.end if.end: ret void } declare void @a()
Data Provenance Initiative
2025-04-01T17:48:26.626383
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-700
Add a test case exposing a bug ; REQUIRES: asserts ; XFAIL: * ; RUN: opt -passes='unswitch<nontrivial>' -disable-output -S < %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output -S < %s ; This loop shouldn't trigger asserts in SimpleLoopUnswitch. define void @test_redundant_switch(i1* %ptr, i32 %cond) { entry: br label %loop_begin loop_begin: switch i32 %cond, label %loop_body [ i32 0, label %loop_body ] loop_body: br label %loop_latch loop_latch: %v = load i1, i1* %ptr br i1 %v, label %loop_begin, label %loop_exit loop_exit: ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626387
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-701
Test the new 64bit i64<->fp functionality ; fcfid and fctid should be generated when the 64bit feature is enabled, but not ; otherwise. ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | grep 'fcfid' && ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+64bit | grep 'fctidz' && ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fcfid' && ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fctidz' && ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | not grep 'fcfid' && ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | not grep 'fctidz' && ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fcfid' && ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fctidz' double %X(double %Y) { %A = cast double %Y to long %B = cast long %A to double ret double %B }
Data Provenance Initiative
2025-04-01T17:48:26.626390
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-702
Add a BUILD_VECTOR with unpack and interleave testcase. ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep punpckl | wc -l | grep 7 void %test(<8 x short>* %b, short %a0, short %a1, short %a2, short %a3, short %a4, short %a5, short %a6, short %a7) { %tmp = insertelement <8 x short> zeroinitializer, short %a0, uint 0 %tmp2 = insertelement <8 x short> %tmp, short %a1, uint 1 %tmp4 = insertelement <8 x short> %tmp2, short %a2, uint 2 %tmp6 = insertelement <8 x short> %tmp4, short %a3, uint 3 %tmp8 = insertelement <8 x short> %tmp6, short %a4, uint 4 %tmp10 = insertelement <8 x short> %tmp8, short %a5, uint 5 %tmp12 = insertelement <8 x short> %tmp10, short %a6, uint 6 %tmp14 = insertelement <8 x short> %tmp12, short %a7, uint 7 store <8 x short> %tmp14, <8 x short>* %b ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626394
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-703
Add test case to verify correct relocs being generated for TLS symbols on PowerPC using the integrated assembler. ;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj %s -o - | \ ;; RUN: elf-dump --dump-section-data | FileCheck %s ;; FIXME: this file should be in .s form, change when asm parser is available. @t = thread_local global i32 0, align 4 define i32* @f() nounwind { entry: ret i32* @t } ;; Check for a pair of R_PPC64_TPREL16_HA / R_PPC64_TPREL16_LO relocs ;; against the thread-local symbol 't'. ;; CHECK: '.rela.text' ;; CHECK: Relocation 0 ;; CHECK-NEXT: 'r_offset', ;; CHECK-NEXT: 'r_sym', 0x00000008 ;; CHECK-NEXT: 'r_type', 0x00000048 ;; CHECK: Relocation 1 ;; CHECK-NEXT: 'r_offset', ;; CHECK-NEXT: 'r_sym', 0x00000008 ;; CHECK-NEXT: 'r_type', 0x00000046 ;; Check that we got the correct symbol. ;; CHECK: Symbol 8 ;; CHECK-NEXT: 't'
Data Provenance Initiative
2025-04-01T17:48:26.626398
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-704
Test case for PR1137. This makes sure that we don't get erroneous "redefinition" errors that cause the upgrade to fail. ; PR1137 ; RUN: llvm-upgrade < %s && ; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f && ; RUN: llvm-upgrade < %s | grep 'tmp = alloca' | wc -l | grep 1 ; target datalayout = "e-p:32:32" target endian = little target pointersize = 32 target triple = "i686-pc-linux-gnu" implementation ; Functions: void %main() { entry: %tmp = alloca uint, align 4 ; <uint*> [#uses=1] %tmp = alloca int, align 4 ; <int*> [#uses=1] "alloca point" = cast int 0 to int ; <int> [#uses=0] store uint 1, uint* %tmp store int 2, int* %tmp ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626401
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-705
Add a test to ensure a bitcast/and/trunc combination eliminates the bitcast. ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast bool %test1(uint %val) { %t1 = bitcast uint %val to int %t2 = and int %t1, 1 %t3 = trunc int %t2 to bool ret bool %t3 } short %test1(uint %val) { %t1 = bitcast uint %val to int %t2 = and int %t1, 1 %t3 = trunc int %t2 to short ret short %t3 }
Data Provenance Initiative
2025-04-01T17:48:26.626405
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-706
Add a test for the LSR issue exposed by r125254. ; RUN: opt < %s -loop-reduce -verify target triple = "x86_64-apple-darwin10" define void @myquicksort(i8* %a) nounwind ssp { entry: br i1 undef, label %loop1, label %return loop1: ; preds = %bb13.loopexit, %entry %indvar419 = phi i64 [ %indvar.next420, %loop2.exit ], [ 0, %entry ] %tmp474 = shl i64 %indvar419, 2 %tmp484 = add i64 %tmp474, 4 br label %loop2 loop2: ; preds = %loop1, %loop2.backedge %indvar414 = phi i64 [ %indvar.next415, %loop2.backedge ], [ 0, %loop1 ] %tmp473 = mul i64 %indvar414, -4 %tmp485 = add i64 %tmp484, %tmp473 %storemerge4 = getelementptr i8* %a, i64 %tmp485 %0 = icmp ugt i8* %storemerge4, %a br i1 false, label %loop2.exit, label %loop2.backedge loop2.backedge: ; preds = %loop2 %indvar.next415 = add i64 %indvar414, 1 br label %loop2 loop2.exit: ; preds = %loop2 %indvar.next420 = add i64 %indvar419, 1 br i1 undef, label %loop1, label %return return: ; preds = %loop2.exit, %entry ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626409
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-707
Add a new testcase which breaks the sinker because the loop canonnicalization pass does not do a canonnicalization that the sinker wants. ; This testcase checks to make sure the sinker does not cause problems with ; critical edges. ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 add | grep Exit implementation ; Functions: void %test() { Entry: br bool false, label %Loop, label %Exit Loop: %X = add int 0, 1 br bool false, label %Loop, label %Exit Exit: %Y = phi int [ 0, %Entry ], [ %X, %Loop ] ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626412
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-708
Add a testcase which got fixed by recent legalization work. ; RUN: llvm-as < %s | llc -march=x86-64 ; PR3886 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind { entry: %a = call <1 x i64> @bar() %tmp5.i = extractelement <1 x i64> %a, i32 0 %tmp11 = bitcast i64 %tmp5.i to <1 x i64> %tmp8 = extractelement <1 x i64> %tmp11, i32 0 %call6 = call i32 (i64)* @foo(i64 %tmp8) ret i32 undef } declare i32 @foo(i64) declare <1 x i64> @bar()
Data Provenance Initiative
2025-04-01T17:48:26.626416
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-709
Add test case for PR22473 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X86 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X64 define zeroext i1 @PR22473(i8*, i8) { ; X86-LABEL: PR22473: ; X86: # %bb.0: ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax ; X86-NEXT: movb (%eax), %al ; X86-NEXT: cmpb {{[0-9]+}}(%esp), %al ; X86-NEXT: sete %al ; X86-NEXT: retl ; ; X64-LABEL: PR22473: ; X64: # %bb.0: ; X64-NEXT: cmpb %sil, (%rdi) ; X64-NEXT: sete %al ; X64-NEXT: retq %3 = load i8, i8* %0, align 1 %4 = icmp eq i8 %3, %1 ret i1 %4 }
Data Provenance Initiative
2025-04-01T17:48:26.626420
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-710
Add a test showing when ld64 can hide linkonce_odr symbols. ; RUN: llvm-as %s -o %t.o ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macosx_version_min 10.10.0 -lSystem -o %t.dylib %t.o -save-temps -undefined dynamic_lookup ; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=IR %s ; check that @a is still a linkonce_odr definition ; IR: define linkonce_odr void @a() ; RUN: llvm-nm %t.dylib | FileCheck --check-prefix=NM %s ; check that the linker can hide @a but not @b ; NM: 0000000000000f10 t _a ; NM: 0000000000000f20 T _b ; NM: 0000000000000f00 T _c target triple = "x86_64-apple-macosx10.10.0" declare void @external() define linkonce_odr void @a() noinline { call void @external() ret void } define linkonce_odr void @b() { ret void } define void()* @c() { call void @a() ret void()* @b }
Data Provenance Initiative
2025-04-01T17:48:26.626423
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-711
Add accidentally deleted testcase back. ; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s ; CHECK: function declaration may not have a !dbg attachment declare !dbg !4 void @f1() define void @f2() !dbg !4 { unreachable } ; CHECK: function must have a single !dbg attachment define void @f3() !dbg !4 !dbg !4 { unreachable } ; CHECK-NOT: !dbg ; CHECK: function !dbg attachment must be a subprogram ; CHECK-NEXT: void ()* @bar ; CHECK-NEXT: !{{[0-9]+}} = !{} define void @bar() !dbg !6 { unreachable } !llvm.module.flags = !{!0} !0 = !{i32 2, !"Debug Info Version", i32 3} !llvm.dbg.cu = !{!1} !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2) !2 = !DIFile(filename: "t.c", directory: "/path/to/dir") !4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2, unit: !1) !6 = !{}
Data Provenance Initiative
2025-04-01T17:48:26.626426
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-712
Make sure this doesn't break when we're improving the isels ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'srwi r., r., 5' int %eq0(int %a) { %tmp.1 = seteq int %a, 0 ; <bool> [#uses=1] %tmp.2 = cast bool %tmp.1 to int ; <int> [#uses=1] ret int %tmp.2 }
Data Provenance Initiative
2025-04-01T17:48:26.626430
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-713
Add test for pinsrd and pinsrb instructions. ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 | grep pinsrd | count 1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 | grep pinsrb | count 1 define <4 x i32> @t1(i32 %s, <4 x i32> %tmp) nounwind { %tmp1 = insertelement <4 x i32> %tmp, i32 %s, i32 1 ret <4 x i32> %tmp1 } define <16 x i8> @t2(i8 %s, <16 x i8> %tmp) nounwind { %tmp1 = insertelement <16 x i8> %tmp, i8 %s, i32 1 ret <16 x i8> %tmp1 }
Data Provenance Initiative
2025-04-01T17:48:26.626434
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-714
Add test case for r170674 ; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16 @.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1 @_ZTIPKc = external constant i8* define i32 @main() { ; 16: main: ; 16: .cfi_startproc ; 16: save $ra, $s0, $s1, 32 ; 16: .cfi_offset 17, -8 ; 16: .cfi_offset 16, -12 ; 16: .cfi_offset 31, -4 entry: %retval = alloca i32, align 4 store i32 0, i32* %retval %exception = call i8* @__cxa_allocate_exception(i32 4) nounwind %0 = bitcast i8* %exception to i8** store i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i8** %0 call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIPKc to i8*), i8* null) noreturn unreachable return: ; No predecessors! %1 = load i32* %retval ret i32 %1 } declare i8* @__cxa_allocate_exception(i32) declare void @__cxa_throw(i8*, i8*, i8*)
Data Provenance Initiative
2025-04-01T17:48:26.626438
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-715
Add test case to show missed opportunity to combine a concat_vector into a scalar_to_vector. NFC ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s define void @PR32957(<2 x float>* %in, <8 x float>* %out) { ; CHECK-LABEL: PR32957: ; CHECK: # %bb.0: ; CHECK-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero ; CHECK-NEXT: vxorps %xmm1, %xmm1, %xmm1 ; CHECK-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3] ; CHECK-NEXT: vmovaps %ymm0, (%rsi) ; CHECK-NEXT: vzeroupper ; CHECK-NEXT: retq %ld = load <2 x float>, <2 x float>* %in, align 8 %ext = extractelement <2 x float> %ld, i64 0 %ext2 = extractelement <2 x float> %ld, i64 1 %ins = insertelement <8 x float> <float undef, float undef, float 0.0, float 0.0, float 0.0, float 0.0, float 0.0, float 0.0>, float %ext, i64 0 %ins2 = insertelement <8 x float> %ins, float %ext2, i64 1 store <8 x float> %ins2, <8 x float>* %out, align 32 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626442
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-716
Add a simple testcase for lowerinvoke ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output && ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output -enable-correct-eh-support implementation int %foo() { invoke int %foo() to label %Ok unwind label %Crap Ok: invoke int %foo() to label %Ok2 unwind label %Crap Ok2: ret int 2 Crap: ret int 1 } int %bar(int %blah) { br label %doit doit: ;; Value live across an unwind edge. %B2 = add int %blah, 1 invoke int %foo() to label %Ok unwind label %Crap Ok: invoke int %foo() to label %Ok2 unwind label %Crap Ok2: ret int 2 Crap: ret int %B2 }
Data Provenance Initiative
2025-04-01T17:48:26.626445
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-717
Add new test to make sure simplifycfg doesn't leave around trivially dead instructions. ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep seteq ; Check that simplifycfg deletes a dead 'seteq' instruction when it ; folds a conditional branch into a switch instruction. declare void %foo() declare void %bar() void %testcfg(uint %V) { %C = seteq uint %V, 18 %D = seteq uint %V, 180 %E = or bool %C, %D br bool %E, label %L1, label %Sw Sw: switch uint %V, label %L1 [ uint 15, label %L2 uint 16, label %L2 ] L1: call void %foo() ret void L2: call void %bar() ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626448
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-718
Add a simple test to make sure getModRefInfo is 1/2 way sane. ; RUN: llvm-as < %s | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef int %callee() { %X = alloca struct { int, int } %Y = int* getelementptr struct { int, int }*, uint 1 %Z = int load struct { int, int }* ret %Z } int %caller() { %X = int callee(); }
Data Provenance Initiative
2025-04-01T17:48:26.626451
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-719
Add test case for r361177. ; REQUIRES: asserts ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -o /dev/null -debug-only=isel 2>&1 | FileCheck %s ; Make sure we emit the basic block exports and the TokenFactor before the ; inlineasm_br. Not sure how to get a MachineIR change so this reads the debug ; output from SelectionDAG. ; CHECK: t0: ch = EntryToken ; CHECK-NEXT: t4: i32,ch = CopyFromReg t0, Register:i32 %3 ; CHECK-NEXT: t10: i32 = add t4, Constant:i32<1> ; CHECK-NEXT: t12: ch = CopyToReg t0, Register:i32 %0, t10 ; CHECK-NEXT: t6: i32,ch = CopyFromReg t0, Register:i32 %4 ; CHECK-NEXT: t13: i32 = add t6, Constant:i32<1> ; CHECK-NEXT: t15: ch = CopyToReg t0, Register:i32 %1, t13 ; CHECK-NEXT: t17: ch = TokenFactor t12, t15 ; CHECK-NEXT: t2: i32,ch = CopyFromReg t0, Register:i32 %2 ; CHECK-NEXT: t8: i32 = add t2, Constant:i32<4> ; CHECK-NEXT: t22: ch,glue = CopyToReg t17, Register:i32 %5, t8 ; CHECK-NEXT: t29: ch,glue = inlineasm_br t22, {{.*}}, t22:1 define i32 @test(i32 %a, i32 %b, i32 %c) { entry: %0 = add i32 %a, 4 %1 = add i32 %b, 1 %2 = add i32 %c, 1 callbr void asm "xorl $0, $0; jmp ${1:l}", "r,X,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* blockaddress(@test, %fail)) to label %normal [label %fail] normal: ret i32 %1 fail: ret i32 %2 }
Data Provenance Initiative
2025-04-01T17:48:26.626465
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-720
Add some tests checking that the verifier rejects cases where a definition doesn't dominate a use. ; RUN: not llvm-as < %s -o /dev/null |& FileCheck %s define i32 @f1(i32 %x) { %y = add i32 %z, 1 %z = add i32 %x, 1 ret i32 %y ; CHECK: Instruction does not dominate all uses! ; CHECK-NEXT: %z = add i32 %x, 1 ; CHECK-NEXT: %y = add i32 %z, 1 } declare i32 @g() define void @f2(i32 %x) { bb0: %y1 = invoke i32 @g() to label %bb1 unwind label %bb2 bb1: ret void bb2: %y2 = phi i32 [%y1, %bb0] %y3 = landingpad i32 personality i32 ()* @g cleanup ret void ; CHECK: Invoke result not available in the unwind destination! ; CHECK-NEXT: %y1 = invoke i32 @g() ; CHECK-NEXT: to label %bb1 unwind label %bb2 ; CHECK-NEXT: %y2 = phi i32 [ %y1, %bb0 ] } define void @f3(i32 %x) { bb0: %y1 = invoke i32 @g() to label %bb1 unwind label %bb2 bb1: ret void bb2: %y2 = landingpad i32 personality i32 ()* @g cleanup br label %bb3 bb3: %y3 = phi i32 [%y1, %bb2] ret void ; CHECK: Invoke result does not dominate all uses! ; CHECK-NEXT: %y1 = invoke i32 @g() ; CHECK-NEXT: to label %bb1 unwind label %bb2 ; CHECK-NEXT: %y3 = phi i32 [ %y1, %bb2 ] } define void @f4(i32 %x) { bb0: br label %bb1 bb1: %y3 = phi i32 [%y1, %bb0] %y1 = add i32 %x, 1 ret void ; CHECK: Instruction does not dominate all uses! ; CHECK-NEXT: %y1 = add i32 %x, 1 ; CHECK-NEXT: %y3 = phi i32 [ %y1, %bb0 ] }
Data Provenance Initiative
2025-04-01T17:48:26.626471
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-721
Add a test case for sext bug that Leo found. ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll ; RUN: llvm-as < %s | lli --force-interpreter=true | grep -- '-255' %ARRAY = global [ 20 x i17 ] zeroinitializer %FORMAT = constant [ 4 x i8 ] c"%d\0A\00" declare i32 %printf(i8* %format, ...) define void %multiply(i32 %index, i32 %X, i32 %Y) { %Z = mul i32 %X, %Y %P = getelementptr [20 x i17]* %ARRAY, i32 0, i32 %index %Result = trunc i32 %Z to i17 store i17 %Result, i17* %P ret void } define i32 %main(i32 %argc, i8** %argc) { %i = bitcast i32 0 to i32 call void %multiply(i32 %i, i32 -1, i32 255) %P = getelementptr [20 x i17]* %ARRAY, i32 0, i32 0 %X = load i17* %P %result = sext i17 %X to i32 %fmt = getelementptr [4 x i8]* %FORMAT, i32 0, i32 0 call i32 (i8*,...)* %printf(i8* %fmt, i32 %result) ret i32 %result }
Data Provenance Initiative
2025-04-01T17:48:26.626475
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-722
Add regression test for r331976 ; RUN: opt %s -S -disable-basicaa -cfl-steens-aa -aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s ; ; Regression: we weren't properly checking constexpr selects. @g = extern_weak dso_local global i32, align 4 @g2 = extern_weak dso_local global i32, align 4 @g3 = extern_weak dso_local global i32, align 4 ; CHECK-LABEL: Function: foo ; CHECK: NoAlias: i32* select (i1 icmp ne (i32* @g, i32* null), i32* @g2, i32* @g3), i32** %a ; CHECK: NoAlias: i32* %b, i32** %a ; CHECK: MayAlias: i32* %b, i32* select (i1 icmp ne (i32* @g, i32* null), i32* @g2, i32* @g3) ; CHECK: NoAlias: i32* @g2, i32** %a ; CHECK: MayAlias: i32* @g2, i32* select (i1 icmp ne (i32* @g, i32* null), i32* @g2, i32* @g3) ; CHECK: MayAlias: i32* %b, i32* @g2 ; CHECK: NoAlias: i32* @g3, i32** %a ; CHECK: MayAlias: i32* @g3, i32* select (i1 icmp ne (i32* @g, i32* null), i32* @g2, i32* @g3) ; CHECK: MayAlias: i32* %b, i32* @g3 ; CHECK: MayAlias: i32* @g2, i32* @g3 define void @foo() { entry: %a = alloca i32*, align 8 store i32* select (i1 icmp ne (i32* @g, i32* null), i32* @g2, i32* @g3), i32** %a %b = load i32*, i32** %a %c = load i32, i32* %b %d = load i32, i32* @g2 %e = load i32, i32* @g3 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626479
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-723
Add test case for D54818 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-pc-windows | FileCheck %s ; We should be able to prodcue a single 128-bit load for these two 64-bit loads. ; But we previously weren't because we weren't consistently looking through ; WrapperRIP. @f = local_unnamed_addr global [4 x float] zeroinitializer, align 16 @ms = common local_unnamed_addr global <4 x float> zeroinitializer, align 16 define void @foo2() { ; CHECK-LABEL: foo2: ; CHECK: # %bb.0: # %entry ; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero ; CHECK-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0] ; CHECK-NEXT: movapd %xmm0, {{.*}}(%rip) ; CHECK-NEXT: retq entry: %0 = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([4 x float], [4 x float]* @f, i64 0, i64 2) to <2 x float>*), align 8 %shuffle.i10 = shufflevector <2 x float> %0, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> %1 = load <2 x float>, <2 x float>* bitcast ([4 x float]* @f to <2 x float>*), align 16 %shuffle.i7 = shufflevector <2 x float> %1, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> %shuffle.i = shufflevector <4 x float> %shuffle.i7, <4 x float> %shuffle.i10, <4 x i32> <i32 0, i32 1, i32 4, i32 5> store <4 x float> %shuffle.i, <4 x float>* @ms, align 16 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626485
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-724
Check in old testcase sitting in my tree %MidFnTy = type void (\2*) implementation int %main() { call %MidFnTy* %Mid(%MidFnTy* %Mid) ret int 0 } internal void %Mid(%MidFnTy *%F) { call void %Bottom(%MidFnTy* %F) ret void } internal void %Bottom(%MidFnTy* %F) { call void %F(%MidFnTy* %Mid) ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626489
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-725
Add test case for ADDC ADDE expansion ;test for ADDC and ADDE expansion ; ; RUN: llvm-as < %s | llc -march=alpha -o %t.s -f ; XFAIL: * define i128 @add128(i128 %x, i128 %y) { entry: %tmp = add i128 %y, %x ret i128 %tmp }
Data Provenance Initiative
2025-04-01T17:48:26.626493
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-726
Add a testcase to verify that commands don't crash when they hit errors on stderr. ; RUN: sh -c "\ ; RUN: opt --reject-this-option 2>&-; echo $?; \ ; RUN: opt -o /dev/null /dev/null 2>&-; echo $?; \ ; RUN: " | FileCheck %s ; CHECK: {{^1$}} ; CHECK: {{^0$}} ; Test that the error handling when writing to stderr fails exits the ; program cleanly rather than aborting.
Data Provenance Initiative
2025-04-01T17:48:26.626496
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-727
Add testcase for legalizing ISD::CTTZ efficiently. On PPC, ctlz(int) is now codegen'd as this: ; Make sure this testcase does not use ctpop ; RUN: llvm-as < %s | llc -march=ppc32 | grep -i 'cntlzw' declare int %llvm.cttz(int) implementation ; Functions: int %bar(int %x) { entry: %tmp.1 = call int %llvm.cttz( int %x ) ret int %tmp.1 }
Data Provenance Initiative
2025-04-01T17:48:26.626500
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-728
Add a testcase for r275581 ; RUN: opt -S -sink < %s | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define void @test1(i32* ()*) { entry: %1 = call i32* %0() #0 fence singlethread seq_cst %2 = load i32, i32* %1, align 4 fence singlethread seq_cst %3 = icmp eq i32 %2, 0 br i1 %3, label %fail, label %pass fail: ; preds = %top br label %pass pass: ; preds = %fail, %top ret void } ; CHECK-LABEL: @test1( ; CHECK: %[[call:.*]] = call i32* %0() ; CHECK: fence singlethread seq_cst ; CHECK: load i32, i32* %[[call]], align 4 ; CHECK: fence singlethread seq_cst attributes #0 = { nounwind readnone }
Data Provenance Initiative
2025-04-01T17:48:26.626504
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-729
Add a test for r267655: Support "preserving" the summary information when using setModule() API in LTOCodeGenerator ; RUN: opt -module-summary < %s > %t1 ; RUN: llvm-lto -save-merged-module -exported-symbol=_main -set-merged-module -o %t2 %t1 ; RUN: llvm-bcanalyzer -dump %t2.merged.bc | FileCheck %s ; Verify that the module includes the ThinLTO informations ; CHECK: GLOBALVAL_SUMMARY_BLOCK target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.10.0" ; CHECK: _main ; CHECK: movl $132 define i32 @_Z3fooi(i32 %a) { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 %0 = load i32, i32* %a.addr, align 4 %1 = load i32, i32* %a.addr, align 4 %call = call i32 @_Z4bar2i(i32 %1) %add = add nsw i32 %0, %call ret i32 %add } define i32 @_Z4bar2i(i32 %a) { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 %0 = load i32, i32* %a.addr, align 4 %mul = mul nsw i32 2, %0 ret i32 %mul } define i32 @main() { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval %call = call i32 @_Z3fooi(i32 44) ret i32 %call }
Data Provenance Initiative
2025-04-01T17:48:26.626507
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-730
Add a test showing that lto produces relaxable relocations. ; RUN: llvm-as %s -o %t.o ; RUN: ld.lld -m elf_x86_64 -save-temps -shared %t.o -o %t.so ; RUN: llvm-readobj -r %t.so.lto.o | FileCheck %s ; Test that we produce R_X86_64_REX_GOTPCRELX instead of R_X86_64_GOTPCREL ; CHECK: R_X86_64_REX_GOTPCRELX foo target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @foo = external global i32 define i32 @bar() { %t = load i32, i32* @foo ret i32 %t }
Data Provenance Initiative
2025-04-01T17:48:26.626511
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-731
Add a test for r307754 ; RUN: opt -S -codegenprepare %s -o - | FileCheck %s ; ; Ensure that we don't {crash,return a bad value} when given an alloca larger ; than what a pointer can represent. target datalayout = "p:16:16" ; CHECK-LABEL: @alloca_overflow_is_unknown( define i16 @alloca_overflow_is_unknown() { %i = alloca i8, i32 65537 %j = call i16 @llvm.objectsize.i16.p0i8(i8* %i, i1 false, i1 false) ; CHECK: ret i16 -1 ret i16 %j } declare i16 @llvm.objectsize.i16.p0i8(i8*, i1, i1)
Data Provenance Initiative
2025-04-01T17:48:26.626515
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-732
Add a test showing how we handle overaligned allocas w/ no-realign-stack ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=skylake | FileCheck %s declare void @capture(i64*) define void @test_natural() "no-realign-stack" { ; CHECK-LABEL: test_natural: ; CHECK: # %bb.0: ; CHECK-NEXT: pushq %rax ; CHECK-NEXT: .cfi_def_cfa_offset 16 ; CHECK-NEXT: movq %rsp, %rdi ; CHECK-NEXT: callq capture ; CHECK-NEXT: popq %rax ; CHECK-NEXT: .cfi_def_cfa_offset 8 ; CHECK-NEXT: retq %a = alloca i64 call void @capture(i64* %a) ret void } define void @test_realign() { ; CHECK-LABEL: test_realign: ; CHECK: # %bb.0: ; CHECK-NEXT: pushq %rbp ; CHECK-NEXT: .cfi_def_cfa_offset 16 ; CHECK-NEXT: .cfi_offset %rbp, -16 ; CHECK-NEXT: movq %rsp, %rbp ; CHECK-NEXT: .cfi_def_cfa_register %rbp ; CHECK-NEXT: andq $-64, %rsp ; CHECK-NEXT: subq $64, %rsp ; CHECK-NEXT: movq %rsp, %rdi ; CHECK-NEXT: callq capture ; CHECK-NEXT: movq %rbp, %rsp ; CHECK-NEXT: popq %rbp ; CHECK-NEXT: .cfi_def_cfa %rsp, 8 ; CHECK-NEXT: retq %a = alloca i64, align 64 call void @capture(i64* %a) ret void } define void @test_norealign() "no-realign-stack" { ; CHECK-LABEL: test_norealign: ; CHECK: # %bb.0: ; CHECK-NEXT: pushq %rax ; CHECK-NEXT: .cfi_def_cfa_offset 16 ; CHECK-NEXT: movq %rsp, %rdi ; CHECK-NEXT: callq capture ; CHECK-NEXT: popq %rax ; CHECK-NEXT: .cfi_def_cfa_offset 8 ; CHECK-NEXT: retq %a = alloca i64, align 64 call void @capture(i64* %a) ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626519
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-733
Add a test to ensure that obvious link messages are actually produced on the standard error. ; Test that linking two files with the same definition causes an error and ; that error is printed out. ; RUN: llvm-as %s -o %t.one.bc -f ; RUN: llvm-as %s -o %t.two.bc -f ; RUN: ignore llvm-ld -disable-opt -link-as-library %t.one.bc %t.two.bc \ ; RUN: -o %t.bc 2>%t.err ; RUN: grep "Function is already defined" %t.err define i32 @bar() { ret i32 0 }
Data Provenance Initiative
2025-04-01T17:48:26.626523
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-734
Add a vector shuffle test case ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps void %test_v4sf(<4 x float>* %P, float %X, float %Y) { %tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0 %tmp2 = insertelement <4 x float> %tmp, float %X, uint 1 %tmp4 = insertelement <4 x float> %tmp2, float %Y, uint 2 %tmp6 = insertelement <4 x float> %tmp4, float %Y, uint 3 store <4 x float> %tmp6, <4 x float>* %P ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626527
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-735
Add test case from PR940. ; RUN: llvm-as < %s | llc -march=x86 void %_ZN13QFSFileEngine4readEPcx() { %tmp201 = load int* null %tmp201 = cast int %tmp201 to long %tmp202 = load long* null %tmp203 = add long %tmp201, %tmp202 store long %tmp203, long* null ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626530
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-736
Make sure adce is basically working! ; RUN: if as < %s | opt -adce -simplifycfg | dis | grep then: ; RUN: then exit 1 ; RUN: else exit 0 ; RUN: fi void %dead_test8(int* %data.1, int %idx.1) { entry: ; No predecessors! %tmp.1 = load int* %data.1 ; <int> [#uses=2] %tmp.41 = setgt int %tmp.1, 0 ; <bool> [#uses=1] br bool %tmp.41, label %no_exit.preheader, label %return no_exit.preheader: ; preds = %entry %tmp.11 = getelementptr int* %data.1, long 1 ; <int*> [#uses=1] %tmp.22-idxcast = cast int %idx.1 to long ; <long> [#uses=1] %tmp.28 = getelementptr int* %data.1, long %tmp.22-idxcast ; <int*> [#uses=1] br label %no_exit no_exit: ; preds = %no_exit.preheader, %endif %k.1 = phi int [ %k.0, %endif ], [ 0, %no_exit.preheader ] ; <int> [#uses=3] %i.0 = phi int [ %inc.1, %endif ], [ 0, %no_exit.preheader ] ; <int> [#uses=1] %tmp.12 = load int* %tmp.11 ; <int> [#uses=1] %tmp.14 = sub int 0, %tmp.12 ; <int> [#uses=1] %tmp.161 = setne int %k.1, %tmp.14 ; <bool> [#uses=1] br bool %tmp.161, label %then, label %else then: ; preds = %no_exit %inc.0 = add int %k.1, 1 ; <int> [#uses=1] br label %endif else: ; preds = %no_exit %dec = add int %k.1, -1 ; <int> [#uses=1] br label %endif endif: ; preds = %else, %then %k.0 = phi int [ %dec, %else ], [ %inc.0, %then ] ; <int> [#uses=1] store int 2, int* %tmp.28 %inc.1 = add int %i.0, 1 ; <int> [#uses=2] %tmp.4 = setlt int %inc.1, %tmp.1 ; <bool> [#uses=1] br bool %tmp.4, label %no_exit, label %return return: ; preds = %entry, %endif ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626535
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-737
Add a test for the recent regression. ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s ; This is a case where we would incorrectly conclude that LBB0_1 could only ; be reached via fall through and would therefore omit the label. ; CHECK: jne .LBB0_1 ; CHECK-NEXT: jnp .LBB0_3 ; CHECK-NEXT: .LBB0_1: define void @xyz() { entry: br i1 fcmp oeq (double fsub (double undef, double undef), double 0.000000e+00), label %bar, label %foo foo: br i1 fcmp ogt (double fdiv (double fsub (double fmul (double undef, double undef), double fsub (double undef, double undef)), double fmul (double undef, double undef)), double 1.0), label %foo, label %bar bar: ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626539
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-738
Add test case for r137711. ; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-EL ; RUN: llc < %s -march=mips | FileCheck %s -check-prefix=CHECK-EB @g1 = common global double 0.000000e+00, align 8 @g2 = common global double 0.000000e+00, align 8 define double @foo0(double %d0) nounwind { entry: ; CHECK-EL: lw $[[R0:[0-9]+]], %got($CPI0_0) ; CHECK-EL: lwc1 $f[[R1:[0-9]+]], %lo($CPI0_0)($[[R0]]) ; CHECK-EL: lwc1 $f{{[0-9]+}}, %lo($CPI0_0+4)($[[R0]]) ; CHECK-EL: add.d $f[[R2:[0-9]+]], $f12, $f[[R1]] ; CHECK-EL: lw $[[R3:[0-9]+]], %got(g1) ; CHECK-EL: swc1 $f[[R2]], 0($[[R3]]) ; CHECK-EL: swc1 $f{{[0-9]+}}, 4($[[R3]]) ; CHECK-EL: lw $[[R4:[0-9]+]], %got(g2) ; CHECK-EL: lwc1 $f0, 0($[[R4]]) ; CHECK-EL: lwc1 $f1, 4($[[R4]]) ; CHECK-EB: lw $[[R0:[0-9]+]], %got($CPI0_0) ; CHECK-EB: lwc1 $f{{[0-9]+}}, %lo($CPI0_0)($[[R0]]) ; CHECK-EB: lwc1 $f[[R1:[0-9]+]], %lo($CPI0_0+4)($[[R0]]) ; CHECK-EB: add.d $f[[R2:[0-9]+]], $f12, $f[[R1]] ; CHECK-EB: lw $[[R3:[0-9]+]], %got(g1) ; CHECK-EB: swc1 $f{{[0-9]+}}, 0($[[R3]]) ; CHECK-EB: swc1 $f[[R2]], 4($[[R3]]) ; CHECK-EB: lw $[[R4:[0-9]+]], %got(g2) ; CHECK-EB: lwc1 $f1, 0($[[R4]]) ; CHECK-EB: lwc1 $f0, 4($[[R4]]) %add = fadd double %d0, 2.000000e+00 store double %add, double* @g1, align 8 %tmp1 = load double* @g2, align 8 ret double %tmp1 }
Data Provenance Initiative
2025-04-01T17:48:26.626543
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-739
Add a test showing the ppc code sequence for getting a function pointer. ; RUN: llc -mtriple powerpc64-linux < %s | FileCheck %s define void @foo() { ret void } declare i32 @bar(i8*) ; CHECK-LABEL: {{^}}zed: ; CHECK: addis 3, 2, .LC1@toc@ha ; CHECK-NEXT: ld 3, .LC1@toc@l(3) ; CHECK-NEXT: bl bar ; CHECK-LABEL: .section .toc,"aw",@progbits ; CHECK: .LC1: ; CHECK-NEXT: .tc foo[TC],foo define void @zed() { call i32 @bar(i8* bitcast (void ()* @foo to i8*)) ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626546
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-740
Add testcase for new feature for simplifycfg pass ; Test merging of blocks that only have PHI nodes in them ; ; RUN: if as < %s | opt -simplifycfg | dis | grep 'N:' ; RUN: then exit 1 ; RUN: else exit 0 ; RUN: fi ; int %test(bool %a, bool %b) { br bool %a, label %M, label %O O: br bool %b, label %N, label %Q Q: br label %N N: %Wp = phi int [0, %O], [1, %Q] ; This block should be foldable into M br label %M M: %W = phi int [%Wp, %N], [2, %0] %R = add int %W, 1 ret int %R }
Data Provenance Initiative
2025-04-01T17:48:26.626550
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-741
Add a testcase for the GlobalOpt inbounds fix. ; RUN: llvm-as < %s | opt -globalopt | llvm-dis | FileCheck %s ; Don't get fooled by the inbounds keyword; it doesn't change ; the computed address. ; CHECK: @H = global i32 2 ; CHECK: @I = global i32 2 @llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @CTOR } ] @addr = external global i32 @G = internal global [6 x [5 x i32]] zeroinitializer @H = global i32 80 @I = global i32 90 define internal void @CTOR() { store i32 1, i32* getelementptr ([6 x [5 x i32]]* @G, i64 0, i64 0, i64 0) store i32 2, i32* getelementptr inbounds ([6 x [5 x i32]]* @G, i64 0, i64 0, i64 0) %t = load i32* getelementptr ([6 x [5 x i32]]* @G, i64 0, i64 0, i64 0) store i32 %t, i32* @H %s = load i32* getelementptr inbounds ([6 x [5 x i32]]* @G, i64 0, i64 0, i64 0) store i32 %s, i32* @I ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626553
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-742
Check to make sure that the CFString's back store ends up in the correct section. ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s ; <rdar://problem/10564621> %0 = type opaque %struct.NSConstantString = type { i32*, i32, i8*, i32 } ; Make sure that the string ends up the the correct section. ; CHECK: .section __TEXT,__cstring ; CHECK-NEXT: l_.str3: ; CHECK: .section __DATA,__cfstring ; CHECK-NEXT: .align 4 ; CHECK-NEXT: L__unnamed_cfstring_4: ; CHECK-NEXT: .quad ___CFConstantStringClassReference ; CHECK-NEXT: .long 1992 ; CHECK-NEXT: .space 4 ; CHECK-NEXT: .quad l_.str3 ; CHECK-NEXT: .long 0 ; CHECK-NEXT: .space 4 @isLogVisible = global i8 0, align 1 @__CFConstantStringClassReference = external global [0 x i32] @.str3 = linker_private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @_unnamed_cfstring_4 = private constant %struct.NSConstantString { i32* getelementptr inbounds ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([1 x i8]* @.str3, i32 0, i32 0), i32 0 }, section "__DATA,__cfstring" @null.array = weak_odr constant [1 x i8] zeroinitializer, align 1 define linkonce_odr void @bar() nounwind ssp align 2 { entry: %stack = alloca i8*, align 4 %call = call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*, %0*)*)(i8* null, i8* null, %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_4 to %0*)) store i8* getelementptr inbounds ([1 x i8]* @null.array, i32 0, i32 0), i8** %stack, align 4 ret void } declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
Data Provenance Initiative
2025-04-01T17:48:26.626557
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-743
Add a testcase for the recent "handle variable vector insert elt in mem" patch ; RUN: llvm-as < %s | llc -march=x86 | grep 1084227584 | count 1 ; ModuleID = '<stdin>' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i686-apple-darwin9.2.2" define <8 x float> @f(<8 x float> %a, i32 %b) nounwind { entry: %vecins = insertelement <8 x float> %a, float 5.000000e+00, i32 %b ; <<4 x float>> [#uses=1] ret <8 x float> %vecins }
Data Provenance Initiative
2025-04-01T17:48:26.626561
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-744
Test dag xform: Fold C ? 0 : 1 to ~C or zext(~C) or trunc(~C) ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep cmov ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep xor ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movzbl | count 1 @r1 = weak global i32 0 define void @t1(i32 %a, double %b) { %tmp114 = fcmp ugt double %b, 1.000000e-09 %tmp120 = icmp eq i32 %a, 0 ; <i1> [#uses=1] %bothcond = or i1 %tmp114, %tmp120 ; <i1> [#uses=1] %storemerge = select i1 %bothcond, i32 0, i32 1 ; <i32> [#uses=2] store i32 %storemerge, i32* @r1, align 4 ret void } @r2 = weak global i8 0 define void @t2(i32 %a, double %b) { %tmp114 = fcmp ugt double %b, 1.000000e-09 %tmp120 = icmp eq i32 %a, 0 ; <i1> [#uses=1] %bothcond = or i1 %tmp114, %tmp120 ; <i1> [#uses=1] %storemerge = select i1 %bothcond, i8 0, i8 1 ; <i32> [#uses=2] store i8 %storemerge, i8* @r2, align 4 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626565
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-745
Add a basic testcase for TBAA-aware LICM. ; RUN: opt -tbaa -licm -enable-tbaa -S < %s | FileCheck %s ; LICM should be able to hoist the address load out of the loop ; by using TBAA information. ; CHECK: entry: ; CHECK-NEXT: %tmp3 = load double** @P, !tbaa !0 ; CHECK-NEXT: br label %for.body @P = common global double* null define void @foo(i64 %n) nounwind { entry: br label %for.body for.body: ; preds = %entry, %for.body %i.07 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %tmp3 = load double** @P, !tbaa !1 %scevgep = getelementptr double* %tmp3, i64 %i.07 %tmp4 = load double* %scevgep, !tbaa !2 %mul = fmul double %tmp4, 2.300000e+00 store double %mul, double* %scevgep, !tbaa !2 %inc = add i64 %i.07, 1 %exitcond = icmp eq i64 %inc, %n br i1 %exitcond, label %for.end, label %for.body for.end: ; preds = %for.body, %entry ret void } !0 = metadata !{metadata !"root", null} !1 = metadata !{metadata !"pointer", metadata !0} !2 = metadata !{metadata !"double", metadata !0}
Data Provenance Initiative
2025-04-01T17:48:26.626571
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-746
Add a test showing how the Leh_func_endN symbol is used. ; RUN: llc -mtriple x86_64-apple-darwin %s -o - | FileCheck %s @_ZTIi = external constant i8* define i32 @main() uwtable optsize ssp { entry: invoke void @_Z1fv() optsize to label %try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* bitcast (i8** @_ZTIi to i8*) br label %eh.resume try.cont: ret i32 0 eh.resume: resume { i8*, i32 } %0 } declare void @_Z1fv() optsize declare i32 @__gxx_personality_v0(...) ; CHECK: Leh_func_end0: ; CHECK: GCC_except_table0 ; CHECK: = Leh_func_end0-
Data Provenance Initiative
2025-04-01T17:48:26.626575
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-747
Add test case to check that calls to mcount follow long calls / short calls options. NFC ; Check call to mcount in case of long/short call options. ; RUN: llc -march=mips -target-abi o32 --mattr=+long-calls,+noabicalls < %s \ ; RUN: | FileCheck -check-prefixes=CHECK,LONG %s ; RUN: llc -march=mips -target-abi o32 --mattr=-long-calls,+noabicalls < %s \ ; RUN: | FileCheck -check-prefixes=CHECK,SHORT %s ; Function Attrs: noinline nounwind optnone define void @foo() #0 { entry: ret void ; CHECK-LABEL: foo ; LONG: lui $1, %hi(_mcount) ; LONG-NEXT: addiu $25, $1, %lo(_mcount) ; LONG-NEXT: jalr $25 ; SHORT: jal _mcount } attributes #0 = { "instrument-function-entry-inlined"="_mcount" }
Data Provenance Initiative
2025-04-01T17:48:26.626579
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-748
Add a new test case for 'undef' shuffles. ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 && ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep shufps void %test(<4 x float>* %res, <4 x float>* %A) { %tmp1 = load <4 x float>* %A %tmp2 = shufflevector <4 x float> %tmp1, <4 x float> undef, <4 x uint> < uint 0, uint 5, uint 6, uint 7 > store <4 x float> %tmp2, <4 x float>* %res ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626582
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-749
Test for 241794 (nest attribute in AArch64) ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s ; Tests that the 'nest' parameter attribute causes the relevant parameter to be ; passed in the right register. define i8* @nest_receiver(i8* nest %arg) nounwind { ; CHECK-LABEL: nest_receiver: ; CHECK-NEXT: // BB#0: ; CHECK-NEXT: mov x0, x18 ; CHECK-NEXT: ret ret i8* %arg } define i8* @nest_caller(i8* %arg) nounwind { ; CHECK-LABEL: nest_caller: ; CHECK: mov x18, x0 ; CHECK-NEXT: bl nest_receiver ; CHECK: ret %result = call i8* @nest_receiver(i8* nest %arg) ret i8* %result }
Data Provenance Initiative
2025-04-01T17:48:26.626585
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-750
Add a test case for PR3779: when to promote the function return value. ; RUN: llvm-as < %s | llc -march=x86 | grep movzbl | count 1 ; rdar://6699246 define signext i8 @t1(i8* %A) nounwind readnone ssp { entry: %0 = icmp ne i8* %A, null %1 = zext i1 %0 to i8 ret i8 %1 } define i8 @t2(i8* %A) nounwind readnone ssp { entry: %0 = icmp ne i8* %A, null %1 = zext i1 %0 to i8 ret i8 %1 }
Data Provenance Initiative
2025-04-01T17:48:26.626589
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-751
Test to make sure we can SCCP load instructions ; This test makes sure that these instructions are properly constant propagated. ; ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep load %X = constant int 42 %Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 }, { int, float } { int 37, float 1.2312 } ] int %test1() { %B = load int* %X ret int %B } float %test2() { %A = getelementptr [2 x { int, float}]* %Y, long 0, long 1, ubyte 1 %B = load float* %A ret float %B } int %test3() { %A = getelementptr [2 x { int, float}]* %Y, long 0, long 0, ubyte 0 %B = load int* %A ret int %B }
Data Provenance Initiative
2025-04-01T17:48:26.626602
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-752
Add testcase forgotten in the 214072 commit. ; RUN: llc -march=ppc64 < %s | FileCheck %s -check-prefix=CHECK-ELFv1 ; RUN: llc -march=ppc64 -mattr=+elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1 ; RUN: llc -march=ppc64 -mattr=+elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2 ; RUN: llc -march=ppc64le < %s | FileCheck %s -check-prefix=CHECK-ELFv2 ; RUN: llc -march=ppc64le -mattr=+elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1 ; RUN: llc -march=ppc64le -mattr=+elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2 ; CHECK-ELFv2: .abiversion 2 ; CHECK-ELFv1-NOT: .abiversion 2
Data Provenance Initiative
2025-04-01T17:48:26.626606
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-753
Add another cyclic dag test case. ; RUN: llvm-as < %s | llc -march=x86 %struct.function = type opaque %struct.lang_decl = type opaque %struct.location_t = type { sbyte*, int } %struct.rtx_def = type opaque %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, ubyte, ubyte, ubyte, ubyte, ubyte } %struct.tree_decl = type { %struct.tree_common, %struct.location_t, uint, %struct.tree_node*, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, uint, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, int, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, long, %struct.lang_decl* } %struct.tree_decl_u1 = type { long } %struct.tree_decl_u2 = type { %struct.function* } %struct.tree_node = type { %struct.tree_decl } %union.tree_ann_d = type opaque void %check_format_arg() { br bool false, label %cond_next196, label %bb12.preheader bb12.preheader: ret void cond_next196: br bool false, label %cond_next330, label %cond_true304 cond_true304: ret void cond_next330: br bool false, label %cond_next472, label %bb441 bb441: ret void cond_next472: %tmp490 = load %struct.tree_node** null %tmp492 = getelementptr %struct.tree_node* %tmp490, int 0, uint 0, uint 0, uint 3 %tmp492 = cast ubyte* %tmp492 to uint* %tmp493 = load uint* %tmp492 %tmp495 = cast uint %tmp493 to ubyte %tmp496 = seteq ubyte %tmp495, 11 %tmp496 = cast bool %tmp496 to sbyte store sbyte %tmp496, sbyte* null ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626611
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }
commitpackft-llvm-754
Add a test case for r208252. Prior to r208252, the FMA 231 family was marked as isCommutable. However the memory variants of this family are not commutable. Therefore, we did not implemented the findCommutedOpIndices for those variants and missed that the default implementation (more or less: commute indices 1 and 2) was firing behind our back. As a result, as demonstrated in the test case before the fix, we were transforming a = b * c + a into a = a * c + b. ; RUN: llc -fp-contract=fast -mattr=+fma -disable-cgp < %s -o - | FileCheck %s ; Check that the 2nd and 3rd arguments of fmaXXX231 reg1, reg2, mem3 are not commuted. ; <rdar://problem/16800495> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx" ; CHECK-LABEL: test1: ; %arg lives in xmm0 and it shouldn't be redefined until it is used in the FMA. ; CHECK-NOT {{.*}}, %xmm0 ; %addr lives in rdi. ; %addr2 lives in rsi. ; CHECK: vmovss (%rsi), [[ADDR2:%xmm[0-9]+]] ; The assembly syntax is in the reverse order. ; CHECK: vfmadd231ss (%rdi), [[ADDR2]], %xmm0 define void @test1(float* %addr, float* %addr2, float %arg) { entry: br label %loop loop: %sum0 = phi float [ %fma, %loop ], [ %arg, %entry ] %addrVal = load float* %addr, align 4 %addr2Val = load float* %addr2, align 4 %fmul = fmul float %addrVal, %addr2Val %fma = fadd float %sum0, %fmul br i1 true, label %exit, label %loop exit: store float %fma, float* %addr, align 4 ret void }
Data Provenance Initiative
2025-04-01T17:48:26.626616
{ "license": [ "Apache 2 License - https://www.apache.org/licenses/LICENSE-2.0", "BSD 2-Clause", "BSD 3-Clause", "MIT License", "MIT License" ], "license_url": "https://opensource.org/licenses/MIT", "language": [ "English", "LLVM" ], "url": "https://github.com/bigcode-project/octopack", "dataset_id": "commitpackft-llvm", "response": "" }