bugpoint question

This is my first time using bugpoint. I'm getting the following error:

  /home/rkotler/llvmw/install/bin/bugpoint -run-llc casts.bc --tool-args -target mips-linux-gnu -mcpu=mips16 -mips16-constant-islands
Read input file : 'casts.bc'
*** All input ok
Initializing execution environment: Found llc: /home/rkotler/llvmw/install/bin/llc
Sorry, I can't automatically select a safe interpreter!

Exiting.
rkotler@ubuntu-rkotler:~/testmips16$

Any ideas?

TIA.

Reed

From: "reed kotler" <rkotler@mips.com>
To: LLVMdev@cs.uiuc.edu
Sent: Friday, November 22, 2013 8:40:24 PM
Subject: [LLVMdev] bugpoint question

This is my first time using bugpoint. I'm getting the following
error:

  /home/rkotler/llvmw/install/bin/bugpoint -run-llc casts.bc
  --tool-args
-target mips-linux-gnu -mcpu=mips16 -mips16-constant-islands
Read input file : 'casts.bc'
*** All input ok
Initializing execution environment: Found llc:
/home/rkotler/llvmw/install/bin/llc
Sorry, I can't automatically select a safe interpreter!

Try using -llc-safe instead of -run-llc. (or specify one of the other "safe" backend options). You may need to specify --safe-tool-args also.

-Hal

In that case it tries to do something but fails.

rkotler@ubuntu-rkotler:~/testmips16$ /home/rkotler/llvmw/install/bin/bugpoint casts.bc -llc-safe --safe-tool-args -target=mips-linux-gnu -mcpu=mips16 -mips16-constant-islands
Read input file : 'casts.bc'
*** All input ok
Initializing execution environment: Found llc: /home/rkotler/llvmw/install/bin/llc
Running the code generator to test for a crash: <llc>
Generating reference output from raw program: <llc><llc><gcc>
Error running tool:
   /usr/bin/gcc -x assembler bugpoint-test-program-11c4f38.bc-e506eb6.llc.s -x none -o bugpoint-test-program-11c4f38.bc-e506eb6.llc.s-9c21d3d.gcc.exe -lm -O2 -Wl,-R.
gcc: error: bugpoint-test-program-11c4f38.bc-e506eb6.llc.s: No such file or directory
*** There is a bug running the "safe" backend. Either debug it (for example with the -run-jit bugpoint option, if JIT is being used as the "safe" backend), or fix the error some other way.
*** Debugging code generator crash!

Checking to see if we can delete global inits: <llc>
   - Removing all global inits hides problem!

*** Attempting to reduce the number of global variables in the testcase
Checking for crash with only these global variables: .str .str1 .str2 .str3 .str4 .str5 .str6 .str7 .str8 .str9... <40 total>: <llc>
Checking for crash with only these blocks: entry cond.true cond.false cond.end cond.true9 cond.false12 cond.end13 cond.true20 cond.false24 cond.end25... <20 total>: Cannot find `opt' in PATH!
simplifycfg failed!

From: "Reed Kotler" <rkotler@mips.com>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: LLVMdev@cs.uiuc.edu
Sent: Friday, November 22, 2013 11:18:53 PM
Subject: Re: bugpoint question

In that case it tries to do something but fails.

rkotler@ubuntu-rkotler:~/testmips16$
/home/rkotler/llvmw/install/bin/bugpoint casts.bc -llc-safe
--safe-tool-args -target=mips-linux-gnu -mcpu=mips16
-mips16-constant-islands

I think that you'll want to provide both --tool-args and --safe-tool-args (with the same arguments).

Read input file : 'casts.bc'
*** All input ok
Initializing execution environment: Found llc:
/home/rkotler/llvmw/install/bin/llc
Running the code generator to test for a crash: <llc>
Generating reference output from raw program: <llc><llc><gcc>
Error running tool:
   /usr/bin/gcc -x assembler
bugpoint-test-program-11c4f38.bc-e506eb6.llc.s -x none -o
bugpoint-test-program-11c4f38.bc-e506eb6.llc.s-9c21d3d.gcc.exe -lm
-O2
-Wl,-R.
gcc: error: bugpoint-test-program-11c4f38.bc-e506eb6.llc.s: No such
file
or directory
*** There is a bug running the "safe" backend. Either debug it (for
example with the -run-jit bugpoint option, if JIT is being used as
the
"safe" backend), or fix the error some other way.
*** Debugging code generator crash!

Checking to see if we can delete global inits: <llc>
   - Removing all global inits hides problem!

*** Attempting to reduce the number of global variables in the
testcase
Checking for crash with only these global variables: .str .str1
.str2
.str3 .str4 .str5 .str6 .str7 .str8 .str9... <40 total>: <llc>
Checking for crash with only these blocks: entry cond.true cond.false
cond.end cond.true9 cond.false12 cond.end13 cond.true20 cond.false24
cond.end25... <20 total>: Cannot find `opt' in PATH!
simplifycfg failed!

Is 'opt' in your path?

-Hal

I'm guessing some of the context so I might be completely off track here but are you trying to find a crash/assertion involving -mips16-constant-islands?
If so, you might find this example from my last round of bug fixing helpful:
  bugpoint foo.ll -llc-safe -safe-tool-args -march=mipsel -tool-args -march=mipsel -mattr=+msa,+fp64

I was trying to fix a crash in llc that only triggered when MSA was enabled (-mattr=+msa,+fp64). The above command uses llc targeting plain little-endian MIPS as the safe tool, and llc targeting little-endian MIPS with MSA as the bugged tool.